Posting to your Facebook page with your own name

Keeping up with Facebook’s constant changes can be a full-time job in and of itself.  What used to be “fan pages” are now simply called “Pages” (not to be confused with your “Profile”).

I have several pages on Facebook that I administer.  One minor annoyance is that when you post or comment to a page you administrate, it’s displays the name of your Page next to the comment, rather than your real name.  For example, if I’m an admin for Chucky’s Chicken Shack, whenever I post, it’s going to display the name as “Chucky’s Chicken Shack”, not “Lane”.

Often that is just fine, but not always.  If you admin a page with several other people, it may be desirable to distinguish between who is posting.  In that case, here is how you can change the default setting.  Please note that each admin will need to follow these steps on their own account.

1.       Go to your Facebook page.

2.       Click on Edit Page at the top right.

3.       Now click on the Your Settings option at the far left.

4.       On the Posting Preferences option, uncheck Always comment and post on your page as… and click Save Changes at the bottom.

5.       Now you will post as your profile name by default.  To post as the Page name, click on Use Facebook as {Page Name} on the right side, directly below the Admins list.

6.       Note that you will need to switch back to Use Facebook as {Profile Name}, otherwise everything you do on Facebook will be attributed to your Page name.

MP3 validator fixes iTunes “Determining Gapless Playback Information” bug

iTunes Determining Gapless Playback Information

One big problem I have had with iTunes is the “Determining Gapless Playback Information” bug.  In a nutshell, every time I open iTunes, it is apparently “determining gapless playback” for the same two dozen tracks.  I keep my iTunes library on my Windows Home Server, and usually access it over wi-fi via my laptop.  With iTunes 8 and 9, this could take upwards of two minutes; in the meantime iTunes was completely unusable – beachball hell.  Connecting my laptop to the router sped things up a bit, but it’s still an annoyance.

Turning off the gapless playback scanning in iTunes preferences didn’t help.  By scouring the Apple support forums, the problem seems to lie in corrupted MP3 files.  They will play back fine, but there’s one issue or another that keeps iTunes from properly doing gapless playback scanning.

My previous solution was just to remove the offending MP3, and then re-encode it from my FLAC archives.   That solution works – up to a point.  The only information I have to go on is the track title that is displayed during the scanning process.  I have a lot of tracks with the same name – for example, I have a lot of Christmas albums, so when one of the offending tracks is “Silent Night”, that means I would need to delete each instance until I found the right one.  Not an ideal way to fix the issue.  So I still had about 15 songs that were subject to this problem.

Enter iTunes 10.  Apple’s latest and greatest still has not fixed the problem, and now it takes far longer to scan the offending files.  We’re talking 5 minutes on a wired connection; I never waited long enough to see how long it took over wifi.  So I had to find a better fix.

After googling “fix my stupid MP3s”, I ran across MP3 Validator at gromkov.com.  I pointed it at my iTunes library, and it chugged away at my collection for about 30-45 minutes.  Surprisingly, about half of my collection was marked as broken.  I allowed it to fix everything, and “a-la peanut butter sandwiches”, I can now work with iTunes as soon as it launches.

Nice work.  Unfortunately this doesn’t help those in a pure Mac environment, as it’s a Windows-only program.  Doing a quick Google search for “Mac MP3 Validator” turned up a similar program: http://triq.net/mac/mp3-validator-mac-os-x (among others.)  I can’t speak to how well it works, but hopefully it will be as effective as well as the program I used.

Easy jQuery Tooltip

Yesterday I went looking for a simple jQuery tooltip, uh, tool, for a website I was working on.  Finding one that wasn’t overly-complicated proved to be more of a challenge than I anticipated.  For the coding noob (e.g. yours truly), “Keep It Simple, Stupid” is the phrase that pays, and most of the ones I came upon tried to do too much and offered too many customization options.

Eventually I stumbled on the self-proclaimed “Simplest jQuery Tooltip Ever“, and I can’t argue with the sentiment.  All you need is jQuery, the additional JavaScript file provided at the link above, and some basic CSS styling (also provided).

Here’s some example code:

<html>
<head>
<link href="style.css" type="text/css" rel="stylesheet">
<script src="jquery.js" type="text/javascript"></script>
<script src="main.js"   type="text/javascript"></script>
</head>
<body>
<a href="#" title="This is the text that will appear
when you roll over the link">Roll over this link</a>
</body>
</html>

Let’s break it down…

<link href="style.css" type="text/css" rel="stylesheet">

… calls the stylesheet that contains a reference to the id selector “#tooltip”.  It has some basic styling info (position, border, background, etc.), but nothing too fancy.

<script src="jquery.js" type="text/javascript"></script>
<script src="main.js"   type="text/javascript"></script>

This first line calls the jQuery library, the second calls main.js, which contains the tooltip code. (Not sure if this qualifies as a jQuery plugin or not…)

<a href="#" title="This is the text that will appear
when you roll over the link">Roll over this link</a>

This is your standard HTML hyperlink, with a couple of differences.  The text contained in the title field is what will be displayed when a visitor hovers over the link.  The href field can contain an actual link; in this case it just points back to the current page.

Doesn’t get much simpler than that!

References:

“Hello World,” C++ style

I cracked open Beginning C++ Through Game Programming (for the third or fourth time since I’ve owned it), and was immediately directed to Appendix A, “Your First C++ Program.”

I was instructed to install Dev-C++, a freeware IDE (Integrated Development Environment). Apparently Dev-C++ hasn’t been actively developed for years, but someone else picked it up and has been updating it under the name of wxDev-C++.  So I am planning on using it rather than Dev-C++.  If I run into any issues, I can always switch back.

So I fire up wxDev-C++, and am greeted with this:

wxDev-C++

Not intimidating at all, nosiree…

So I go to File -> New -> Source File (Or simply hit CTRL+N) to start a new file.

The first program the book provides is a variation on the “Hello World” program.  The example given in Wikipedia’s entry for C++ is as follows:

#include <iostream>

int main()
{
   std::cout << "Hello, world!n";
}

Looks simple enough.  Not quite sure what all of the alphabet soup means yet, but at least it’s short.

I paste it into the source code window, save the project as “hello_world”, then go to Execute -> Compile (or hit CTRL+F9).  A “Compile Progress” window is displayed, which doesn’t tell me a whole lot, other than the status is “Done.”  Allrighty then.

So I go to the the folder where I saved the project file, open the command prompt, and type “dir” (ah, DOS, how I don’t really miss you).

I see the .cpp project file at a svelte 96 bytes, as well as the hello_world.exe file, coming in at a whopping 464 KB.  I suppose that contains all of the libraries and other infrastructure necessary to actually run the program.

I type in “hello_world”, hit Enter, and bingo-bango:

Sweet.  Google, you got a job for me yet?

jQuery Mobile

I haven’t even made it into the first actual Beginning C++ Through Game Programming post before there was a diversion! Oh well, gotta roll with the punches.

I just learned via this Mashable article that the developers of jQuery (the popular JavaScript-based framework) recently introduced their jQuery Mobile initiative, which should allow for cross-platform development on various mobile devices.

It should be interesting to see where this leads – jQuery is easy enough for a beginner like me to use with minimal fuss, and hopefully the mobile version will be as well.

Introduction

Note: Several years ago I started a blog called “The Coding Noob” which never went anywhere.  I’ve since rolled those posts into my personal blog.  This was the introductory post.

History

When I was a kid, my dad would take me to the local community college to play on their VAX mainframe computer. I initially spent my time playing Colossal Cave Adventure [play] and Star Trek [play]; but eventually started dabbling in Beginners All-purpose Symbolic Instruction Code, or BASIC.

BASIC was an easy-to-learn programming language that was ubiquitous in the early 80s. Anyone who owned a home computer in those days is probably familiar with this bit of code:

10 PRINT "HELLO"
20 GOTO 10

…which would display a never ending column of “HELLO”s on the computer screen.

I took a number of Saturday morning classes at the college, learning the ins and outs of BASIC. I received a Commodore 64 for Christmas one year, with which I spent even more time in the world of variables, GOSUBs, and IF/THEN statements.

While I spent a lot of time playing games, I also spent hours upon hours typing in BASIC and assembly language programs from the pages of Compute!’s Gazette magazine. I tried my hand at writing my own programs; probably the most sophisticated one was a text boxing simulator, based on a pen-and-paper game a school friend thought up. It wasn’t much, as I knew nothing about boxing, and a text-based boxing simulator is about as boring as it sounds.

While BASIC was an excellent introduction to programming, it was also very limited. At the time, assembly language was where the real money was, at least on the Commodore 64. It provided much faster performance and far greater flexibility, but with a very steep learning curve. You also needed additional programs such as a compiler and debugger, which weren’t cheap.

As I entered high school, I discovered the guitar (and girls); and lost interest in programming.

Enter the Internet

Throughout high school and the first couple of years in college, I used the computer extensively, but it was mostly for schoolwork and games.  I did take a few computer classes here and there, including a HyperCard class, which would also serve as my introduction to the internet. Over the next few years, I would develop several various websites, and eventually it became my full-time job.

This was not coding, but at least I was able to be creative and make a living using my computer skills. But there’s only so much you can do with HTML. To really make websites sit up and beg, you need – you guessed it – programming skills. Over the years I have learned some basic JavaScript, but even that is not truly “programming” (though it does share many similarities).

So What?

For years I have wanted to really dive deep and truly “learn” how to program. I think the roadblocks for me are:

  1. What programming language(s) to learn. There are dozens of languages and approaches. Do I learn C++? C#? Python?  Objective C? Java? PHP? ASP? None of the above?
  2. How to apply what I learn into something valuable and applicable to my career.

So rather than fumbling around blindly, in the past I have chosen not to do anything at all. Which isn’t the way to accomplish much of anything.

Along the same lines, I have been trying to come up with new blog ideas. So this week it just hit me – why not blog about my attempts at learning how to program? I have no idea if this will be of interest to anyone else, but hopefully it will give me motivation to progress. And by writing down what I’m doing, it may help with retention – which has been a stumbling block in the past.

Goals

I’m not quite sure what my ultimate goals are. Primarily, I’d simply like to increase my proficiency in programming techniques in general. Applying this knowledge to my career is another goal. Developing for mobile devices is a growing industry, and will only continue to grow going forward, so that is an area I’d like to address. And of course – games. Ever since I was that four-eyed kid in the community college computer lab, I have wanted to create my own games, so that’s certainly something I’d like to pursue – even if it’s a Space Invaders or Breakout ripoff. Of course, coming up with the next Peggle or Farmville wouldn’t hurt either.

Enjoy!