Scratch

A while back I mentioned Scratch as one of the things I used to kindle my programming career. It is said that in order to truly understand something you have to teach it. Scratch is a wonderful teaching tool for programming.



Scratch allows new programmers (often kids, but not always) to create sprite based interactive content (i.e. games) easily. Programming blocks such as if statements, variable assignments, and events snap together into scripts like Lego(tm) bricks.

I created a dozen games for a gallery to show off concepts and explore mechanics, both in technology and game mechanics. I then made a couple of presentations to teach those ideas to group of teenagers for an event.

Scratch makes a great tool to turn some fun time into easily understandable demonstrations of programming knowledge. It can be read by someone who's never programmed and entertain the veteran. It was such a simple resume addition that I'd suggest everyone in the programming field take some time with it, you'll probably like what you create with it.

Gaming: Starcraft 2 Release

Starcraft 2 is being released today. I probably won't be playing it tonight. Here's why.



I preordered Starcraft 2 several weeks ago and participated in the Beta. I loved it from first marine. Almost everything there was to enjoy in the original was available, either directly or as a reinvisioned counterpart. For example medics and dropshops are combined into medivacs, dune buggies wield fierbat style flamethrowers, wraiths are divided into vikings and banshees with each being decidedly better at a specific style of gameplay than their predecessor.

New units and the cliff jumping mechanic add another dimension to the tactics already well known by Starcraft players. The game feels exceptionally well balanced and I have no doubt it will continue to improve in future installments and patches. If this game is so wonderful why am I abstaining tonight?

Network latency. While I could rant against Blizzard for under developing their network capabilities, I know inside this probably isn't true. More likely it is a problem of economics. If the game only uses 50% of the network resources during normal prime time, how do you justify the increased capital costs for a release activity spike, a statistical outlier? It can work 99% of the time (1 day of downtime a quarter i.e. patch days) at a fraction of a cost of 99.9% uptime (9 hours of yearly downtime i.e. product release).



So I'm going to patiently wait 24 hours for the flash mob to pass before firing up my retail client. Then watch out ladders, here I come.

Why I'm Here: Part 2

When we left my life story last I had accepted a job in IT support for the local library. Economics downturns loomed unseen over the horizon and programming jobs were sparse and getting sparser. How did I weather the storm?

In retrospect it is easy to say I did poorly. I could have contributed to any number of open source projects for the requisite experience, but it felt like an impossible task. Open source still does in some ways, merging into an existing workflow with people you've never met in technologies you've never used.

Bounce your http request off this!


At the time the job search felt tremendously difficult. Programming jobs didn't land in my lap like IT support ones did. "Two years experience" were dreaded words. I tried a number of websites and technical recruiters. It took nearly a year and half to land my first interview. The job offer was made and within days was rescinded. The employer had lost a client who represented half their business.

Disappointed I left the recruiter and job websites. I spent the next year posting resumes directly to company and government listings. No bites, not even a nibble. Opportunities for promotion within my current employer appeared nonexistent.

I eventually got myself involved with my local Java Users Group. I began playing with Perl and Ruby during my free time. Concepts like Model, View, Controller that were barely covered in college crept into my understanding. Software testing tools came onto my radar, even if they still don't saturate my process. I put together a website to stretch my knowledge of PHP, javascript, HTML, AJAX, forms, and SQL. At work I got a chance to teach kids to use a introductory programming tool called Scratch. I wrote a novel, a personal life goal.

One day the recruiter who sponsored the Memphis JUG listed a entry level programming job with the group. I applied, my presence in the meetings sparked a recognition, my website feed their desire to know more. Those little things I had been doing the past year kindled my degree into a finally respectable application. I applied, interviewed, interviewed, and interviewed. Again I was offered a position, but this time with company whose client base was broad enough to survive any momentary lapse in funding.

I accepted and put in my two weeks notice. I felt so eager to be at my new job, I worried I was building it up to much. But so far it has been more than I hoped for and it doesn't look to be letting up anytime soon.

iPhone vs. Android

A house divided cannot stand.

Well, not really. My household was split along the Droid/iPhone divide for months as we used work provided smart phones of differing heritage.

I spent my work time on the Verizon Droid.

While my wife happily plugged in her AT&T iPhone 3GS.



With my new developer job came a new phone, sort of. I get a stipend to spend on cell phone service, so I get to pick and own the phone. Our personal cell phones, home phone, and internet service is already through AT&T. Since I don't expect to be accepting nearly as many work related calls, I'm thinking about doing both personal and business calls off one device. Hence my provider is preselected.

AT&T gives me the option to go iPhone or Android and each have recent additions to their line ups in the iPhone 4G and Samsung Captivate. I have a dilemma.

I appreciate Apple's choice to provide an end to end solution and apparently developers at large do to. This is pointedly obvious with the iPhone exclusive app "Words with Friends", a Scrabble(tm) clone that would probably be only game on either device I'd purchase if it didn't already come with an Ad driven free version. A larger user base could also help sell any apps I may one day develop. The forward facing camera has potential as well.

However, I appreciate Google's relaxed market rules. The horror stories of iPhone app applications gone awry make me concerned about what might become of my first attempt to do cell phone development. Also I make frequent and extensive use of Google's services, such as Google Voice, which are tightly integrated with Android and sometimes completely unavailable on the iPhone. Unfortunately the Captivate does not include an LED flash, a travesty with a 5 mega-pixel camera.

I was thinking the integration with Google services is going to end up being the killer app for me. The features of the iPhone are enticing, but I don't see myself doing any video conferencing. What I do see myself doing is taking pictures. A missing $10 LED flash is going to drive my purchase of a $200 phone.

w3schools

One of the reference websites I got a lot of use out of even before I started my current position was W3Schools.

W3Schools is a free site, low noise and high signal. It covers a large swath of technologies, but they are all applicable to someone creating web applications. I had learned HTML from a great reference book from HeadFirst labs, but the tutorials on W3Schools were essential. They are easily referenced from anywhere and help easily demonstrate principles. Most tutorials give you a chance to try code out yourself, without leaving you with a bunch of text files to clean up or installing any tools, perfect for learning on shared machines. I picked up PHP almost exclusively with W3Schools. Even my work with PostGreSQL was greatly simplified by comparing it with the MySQL examples within the PHP examples.

Check out W3Schools if you have to do any web development. It is a great way to get started for a budding web developer.

Upcoming Travels: devLink

I'll be attending devLink in Nashville, TN on August 5th-7th.

I'm really looking forward to what will be my first developer's conference. In particular the sessions on how Windows 7 was so dramatically faster than Vista and building a Google Contacts app in Silverlight both are peaking my interest.

If you're doing any development with Microsoft tools and technology, you should take a look at this conference. For those already planning to attend I look forward to seeing you there.

Why I'm Here: Part 1

I mentioned in a previous post that I've started my first development job. Let me tell you why this is a big deal for me.

I've been into computers for a long time. My father installed my first computer game before I was eight. He didn't install the second, I did. Any games, drivers, patches were all my responsibility to figure out if I wanted to play. Eventually hardware became my concern as I was the expert on it as well in the family. While I've always been decent at what I'd collectively call support services, they were never the payoff. They were just work to get to the functional software experience on the disk (and later on the network).



For some reason, my first high school didn't put college bound students into programming classes. That seemed to be cordoned off for tech school kids. I knew I was interested in programming, but I didn't think I had access. Luckily, I applied to an academic magnet that did give everyone the ability to get into programming. Two years of high school C++ were followed up with four years of bachelor's degree in Computer Science, mostly taught in Java.

Throughout high school and college I continued to provide support services to employers, friends, and family. When I graduated college I had a split personality resume, education in programming and experience in support. And I couldn't find a job in either. Instead I found jobs making sandwiches, selling jewelry, and packing boxes. Eventually I found a decent wage providing support services for a library system. I had just gotten married and was eager to provide a reasonable income to my new household.



Little did I know, one of the worst recessions was about to land on the US economy and lock me into that position for three years.

Code Puzzler: jQuerry

Problem:

Earlier this week I came across some quirky behavior in jQuery. Pseudo code is provided below:


<input type="text" class="inputClass">An input</input>
...
<tr class="trClass">Row containing option dependent on input</tr>
<script>
$('.inputClass').change(function(){
if($('.inputClass').val() > 0){
$('.trClass').show();
}
else{
$('.trClass').hide();
}
}).change()
</script>



Seems simple enough. jQuery binds a function to the changed event and fires it off once on load to set the default behavior.

Puzzle:

It works on page load. It works the second and following times the input is updated.

It does nothing the first time the input in changed and loses focus. As far as we can tell change doesn't fire at all.

Solution:

After puzzling after this behavior for more than should have been required, chasing down the event with alert statements, .ready(), and .blur() events on load to try to initialize or eat the first user initiated .change() we call in the senior programmer. Five minutes later he's done.

He changed all the .change() events to .blur(). The missing update fires .blur() normally.

Ongoing Mystery:

We still don't know if .change() was being eaten by something else of if .change() just doesn't work correctly with text input. More importantly, we don't have a good way to tell.

If you do have a good way to tell, include it in the comments below.

Why We're Here

Two weeks ago I started my first software development job.

You're Hired!


It had always been my intention to start a blog immediately after starting so I could document all the things I was learning. It would serve as a pick me up if I ever felt like I wasn't making progress. I could always look back at my blog and say "Look, an artifact of progress!"

Slow progress has not been the problem.



During my first two weeks new technologies I have learned what currently feels like an absurd number of new things. Aspects of a new language, a source control program, a diff tool, a SQL implementation, a wiki editor, a jQuery plugin, and bug reporting software were comparatively easy additions. Over half a dozen new passwords threaten to overtake my memorization abilities. I can remember the passwords themselves, but matching the service to the password is sometimes tedious. Server (and employee) names also escape me frequently.

What takes up the most time is sifting through tens (maybe hundreds?) of thousands of lines of (new to me) code. Figuring out how it all interconnects, in software dialects I haven't read before, is the true challenge. Like filling out a crossword puzzle in Sanskrit, making sense of all these pieces is a puzzle only for the most determined or foolhardy. Luckily I've been guided by the existing development staff, but even among them some of the code is a mystery. Signposts have been worn away by the passage of time and additional development, deprecated code lays in the repository like snow drifts filling a mountain pass.



That said I still think I can get some use out of this blog and I hope you can too. In my future posts I might explain how.