Sep
17
2007
0

Learn How to Think

The good folks at O’Reilly were kind enough to send me a copy of Beautiful Code to review. I really enjoyed this book and highly recommend it to anyone who spends any significant amount of time in front of a screen cutting code. The following is my review on what I’m sure is a classic in the making:

A frequent topic of discussion among those in any technical field is for a short list of essential books that anyone worth their salt has read. With regards to software engineering, two classics quickly come to mind: Code Complete, and Design Patterns, as well as a recent publication joining the ranks of these epics, Beautiful Code by O’Reilly Media.

What makes Beautiful Code stand apart from the rest, is that it’s format is so unconventional when compared to most other programming texts. The book is comprised of 33 Chapters, each written by a different author about a particular bit of code they had written and thought to be particularly eloquent. The best way to explain why this book is so wonderful is to make an analogy about the differences between learning something via a lecture as opposed to a private lesson. Most instructional books will take the lecture approach, where the author shows you one correct way to solve a problem, or complete a certain task and the reader must then digest that as best as possible. Beautiful Code is more like a private lesson in which the author of each chapter is giving the reader personalized attention by explaining their thought processes, how they arrived at each step, and occasionally showing some dead ends that didn’t work out. Now consider that these private lessons are being given by such legendary names as Brian Kernighan, Charles Petzold, and Yukihiro Matsumoto – and it becomes obvious why this is a must-have addition to any serious software engineer’s bookshelf. Some particularly memorable sections include Karl Fogel’s discussion on the origins and implementation of the Subversion Delta Editor and the look inside Google’s MapReduce technology by Jeffrey Dean and Sanjay Ghemawat.

As stated earlier, one of the best strengths of this book is that it is language neutral. In each chapter, as the author is speaking from experience on a particular project, rather than writing a chapter for a hypothetical “Better Programming in Language XYZ”, you will see code snippets in C#, MSIL, Python, Ruby, and several other languages (There’s even one chapter with Emacs Lisp!). This is important because the insight gained from this book will not be diluted from one language falling out of favor or into obsolescence, and allows for the possibility of this title being just as valuable ten years from now.

Many books will teach you how to solve a problem, but rare are those to teach you how to think. Beautiful Code is one of those select few, and will keep you coming back from project to project to consult its veteran sages of computer science. A worthy edition to any serious programmer’s library, and hopefully a second volume is not far off.

Written by in: Computing,Software |
Sep
11
2007
0

More on Programming for Beginners

A while ago, I wrote a post about how I think that programming is really difficult to get into these days without a ton of effort on the learner’s part due to varying factors such as language complexity and operating system api’s. I then proceeded to discuss a product by MIT Media Labs called Scratch that was designed to teach children programming by addressing these issues. In case you don’t remember, I wasn’t too fond of Scratch.

Last night at the Chicago Ruby Users Group, there was a presentation on Shoes, which is another project in this vein that uses Ruby as its underlying language. Shoes addresses all of the complaints I had with Scratch, and lets you write code instead of relying on a mouse/GUI driven interface. Writing a program in Shoes is very straightforward, and you can do a lot of neat stuff in a very few, simple, straightforward lines of code. I was pretty impressed. This is exactly the type of thing we need in a world that is devoid of QBasic.

Here’s a screenshot of a sample program called follow.rb that draws circles depending on the position of the mouse cursor: (the sourcecode is in the terminal to the right of the demo)

Shoes Demo

This screenshot doesn’t really do it justice though – because Shoes is built on top of Cairo and Pango, the demo runs very smoothly and doesn’t reek of jittery animation like so many other sandbox programming environs.

While it’s definitely not a finished product ( 1 or 2 of the demos segfaulted on me due to some C code in the Shoes app) – it runs on Windows, OS X   AND   Linux. I had no problems checking out the source from subversion and building Shoes on my Ubuntu 7.04 laptop. Shoes is a huge step in the right direction with regards to addressing the issue of getting kids into programming by making it less of an impossible task. I look forward to watching this project develop, and really hope that it catches on.

Written by in: Computing,Software |
Aug
23
2007
0

Midnight Programming

Recently read Soul of a New Machine which is a great read for any engineer, especially a Computer Engineer as the plot revolves around Data General’s battle to create a 16/32 bit hybrid computer in the late seventies.

One passage in particular stuck out to me, regarding a team member talking about their college experience:

It was an IBM Machine, archaic now but gaudy then. The university owned it, in effect, and it lay inside a room that none but the machine’s professional caretakers could enter during the day. But Alsing found that a student could just walk into that room at night and play with the computer. Alsing didn’t drink much and he never took any other drugs. “I was a midnight programmer,” he confessed…
…About ten other young undergraduates regularly attended these sessions of midnight programming. “It was a whole subculture. It’s been popularized now, but it was a secret cult in my days,” said Alsing. “The game of programming – and it is a game – was so fascinating. We’d stay up all night and experience it. It really is like a drug, I think.” A few of his fellow midnight programmers began to ignore their girlfriends and eventually lost them for the sake of playing with the machine all night. Some started sleeping days and missed all of their classes, thereby ruining their grades. Alsing and a few others flunked out of school.

As I read this – it was all too eerie and familiar. The allure of technology. When I first started undergrad, we didn’t have a computer in some obscure closet – but we did form our own nerd subcultures around certain projects and places. For the Computer Science students at the University of Arizona it was the Harvill Lab then later after Harvill was closed, the Gould-Simpson lab aka “GS228″ aka “The Human Fishtank”. The Human Fishtank was room that had been designed for big iron when the building was designed – air-conditioning coming out of the floors, and plexiglass walls for people to marvel at the latest room-filling mainframe industry had produced. Later when big iron fell out of style, they crammed the room full of cheap pcs and desks – and it was guaranteed that given any day of the year, any time of day (thanks to the 24 hour access), you could go in there, cut some code and find a person or two to talk shop with.

Or if you went over to the Aerospace and Mechanical Engineering building after 5pm – there was an entirely different, yet similar subculture that came out of the woodwork after dark. The SAE kids would work all night on their Formula car, occasionally sleeping under tables or in their 3rd floor office. The asian grad students had apparently evolved to a state in which they required no sleep and would be hard at work advancing the state of the art in fluids or rocket design. There wasn’t more than a handful of rooms in the 9 floor building that were uninhabited or let alone had the lights off. I would generally be in the Aerial Robotics lab working on code for Machine Vision or AI for our UAV, or sometimes on the other side of the building actually wrenching on an aircraft with some fellow students. On a slight tangent, I think a defining moment in my life was the night I turned 21. Popular tradition in college, is on this special occasion for your friends to take you to a bar for the first time to get you monumentally drunk. I spent my last night being 20 in a laboratory prepping a UAV for a maiden flight that ended in a spectacular crash.

In one way or another, like a drug – each one of us Midnight Engineers paid for our addiction in one way or another. Just like the book says, some lost their grades, some also flunked out of school. Myself, I lost my girlfriend – this caused me in the months that followed to look deeply into what else I had lost in this pursuit. I was no longer playing music, I spent most of my time alone debugging programs and hardware, I had lost touch with many of the people who cared about me, I no longer had a girlfriend that loved me.

What was the point?
Was I an addict?
This realization made these engineering pursuits less and less gratifying, until I lacked all interest and figured that some serious reevaluation of my current life was in order. Within a week, I had dropped out of school and was packing my belongings to head back to the Midwest to sort my life out.

That was about a year and a half ago, and I think that in the time I’ve learned a lot about life. Dropping out of college was probably the best thing that ever happened to me.

Written by in: Computing,Life |
May
23
2007
1

Enabling Fn Keys on Sony FS Series Laptops

As many of you may know, Sony laptops don’t always play nicely with Linux due to a bunch of closed hardware. One major annoyance is the Fn keys not working out of the box, and not being able to adjust volume or brightness with them.

Doing some research, I found a solution on the Ubuntu forums here.

Reading through the posts and doing the command line work can be frustrating if you’re new to Linux and aren’t comfortable yet with the terminal – or if you’re just lazy.

I’ve put together a convienience script that will pull everything in, install a patched sony_acpi kernel module to control brightness programmatically, and enable the Fn keys.

Let me know if this helps you out!
(Ubuntu 7.04 / Feisty Users Only!)

Download: feisty-fsfn.sh

Written by in: Computing,Projects,Software |
May
17
2007
3

The Itch Remains.

When you first hear about it’s goal, MIT Media Lab‘s Scratch seems like a good idea – create a programming environment that is accessible to young people getting their feet wet with code for the first time. As you look into the matter further, the world really is lacking a good first programming language these days.

Now for an aside to a long time ago in a basement 30 miles away…
Every programmer has their story of their first programming experience, mine was discovering QBASIC on accident while messing around in DOS on my best friend’s 386sx. What followed was an entire summer learning basic concepts from the online help system. To this day I still remember do: while $INKEY = “” as a rudimentary way of trapping keyboard input. Nostalgia and poorly coded text games aside, this brings me to my point. What is today’s analogy for QBASIC in 2007?

Coding these days on any platform requires serious knowledge, and BS’ing your way through a program with almost total disregard for structure, style and logic the way I did as a kid back in 1994 is next to impossible these days. Having a sandbox language to write trivial programs is important! If I’m 10 years old, I could care less if a language is statically or dynamically typed, or if it has a particularly good standard library XML parser! I just care about seeing my name displayed in alternating colors, feeling that I’m writing a program, and most importantly the feeling of discovery that comes with.

Scratch pretty much fails on all levels in this respect. The first thing that comes to mind when looking at the Scratch interface is that MIT has recreated some Adobe Flash with some Lego-Centric design motif. If this didn’t have the MIT Media Lab stamp on it, it would be universally panned across the board as reinvention of the wheel. Why are people getting so amazed at the ease that a poorly animated cat with annoying sound effects can be created with the drag and drop interface? Is this something we need to be encouraging people to do more of, have any reviewers been on the internet lately? (Before trying to argue with me on this, find a ytmnd meme and try and explain how that’s much different.)

Most bothersome to me is the total lack of coding involved via the drag and drop interface. You can’t make a legitimate product aimed at getting young people excited about coding, if there is a complete absence of the aforementioned! Scratch is a software toy and nothing more. It can be described as marginally educational I guess, but I have a hard time seeing anyone doing much more with it than making inappropriate animations and trying to harass people nearby with a barrage of sound effects. Call me old fashioned, but in terms of programs for use in schools to develop the underlying skills to code, such as math and critical thinking – I’ll take Number Munchers and The Incredible Machine anyday.

Maybe I’m wrong, and I just don’t get it?
Time will tell!

Written by in: Computing,Software |

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com

  • Buy Cheap phentermine fedex Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest weight loss medication over the counter Online Pharmacy Store. Cheap Pharmacy Online.
  • Buy Cheap nexium canadian Now Online Prices For nexium canadian! Pharmacy Store.
  • Buy Cheap buy online without prescription ativan Now Cheap Pharmacy Online. No Prescription Needed.
  • Buying Cheap levitra sample. Worldwide Rx, Good Prices. WorldWide Shipping.
  • Buy Cheap online valtrex Now Low Prices. Safe And Secure Payment System.
  • Buy cheap generic viagra Online Without Prescription. Best Internet. Best Prices.
  • Buy Cheapest low cost zolpidem Now Pharmacy Store. Discount Pharmacy Online.
  • Buy Cheapest sleeping disorder information Online 24/Online Pharmacy. Pharmacy Store.
  • Buy Cheap genuine viagra Now Drug Store Without A Prescription. Low Prices.
  • Buy Cheap prescription medications for depression Now Best Internet. Special Prices For prescription medications for depression!
  • Buy Cheapest should i take valium Now WorldWide Shipping. Buy Medications Online.
  • Buy Cheap uk levitra Online WorldWide Shipping. 24/Online Pharmacy.
  • Buy Cheap cialis from india Now Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheap non-prescription drugs against depression Now Drug Store Without A Prescription. Low Prices.
  • Buy Cheap healthcare pharmacy Now Best Drugstore. 24/Internet)(safe Pharmacy.
  • Buy Cheap prescription medicine for weight loss Now Cheap Meds Without Prescription. Best Prices.
  • Buy Cheapest valium info Now Cheap Prescription Drugs. Best Prices.
  • Buy Cheap meclizine drug Now Cheap Pharmacy Online. Cheap Online Pharmacy.
  • Buy Cheap extreme weight loss pills Now Top Online Pharmacy Supplier. Best Prices.
  • Buy Cheapest propecia online prescription Now Internet Prices For propecia online prescription! Best Drugstore.
  • Buy Cheapest cialis 20 Online No Prescription Needed. Pharmacy Store.
  • Get impotence pill Without Prescription Consultation. 24/Online Pharmacy.
  • Buy Cheapest sleep disorder and medication Online Buy %items% Online Without Prescription.
  • Buy Cheapest lorazepam Now Pharmacy Store. Buy Medications Online.
  • Buy Cheapest canadian drug store Now Best Prices. Top Online Pharmacy Supplier.
  • pain medication for sale Online Without Prescription Pharmacy Store. Best Online.
  • Buy Cheapest buy phentermine tablets without prescription Online Pharmacy At The Best Price! Best Online.
  • Buy Cheap cheap appetite suppressants Online Cheap Online Pharmacy. Pharmacy Store.
  • Buy Cheap overdose on xanax Online Low Prices. The Largest Internet Pharmacy.
  • Buy Cheap order bactrim Online Pharmacy Store. Online Prices For order bactrim!
  • Buy Cheap how to get pain medication Now Cheap Online Pharmacy. Buy Medications Online.
  • Buy Cheapest free prescription medicine Now Special Prices For free prescription medicine! Best Prices.
  • Buy Cheapest deep diet pills Now No Prescription Needed. WorldWide Shipping.
  • Buy Cheap on-line drugstore Now Internet Prices For on-line drugstore! Best Online.
  • Buy Cheap phentermine on line consultation Now Online Medical Shop. WorldWide Shipping.
  • Buy Cheap clonazepam .5mg Now Discount Online Pharmacy Shopping. Low Prices.
  • Buy Cheap cialis super viagra Online 24/Internet)(safe Pharmacy. Low Prices.
  • Buy Cheap drug viagra Now 24/Internet)(safe Pharmacy. Pharmacy Store.
  • Buy Cheapest levitra without prescriptions Online Best Online. Drugs, Health And Beauty.
  • Buy Cheap promethazine codeine Now Best Drugstore. Top Online Pharmacy Supplier.
  • Buy Cheapest reaction to codeine Now Online Prices For reaction to codeine! Best Drugstore.
  • Buy Cheapest valium baby effects Online Top Online Pharmacy. Best Internet.
  • Buy Cheapest find viagra free sites Online Best Online. Special Prices For find viagra free sites!
  • Buy Cheapest order cialis online Online Low Prices. 24/Online Pharmacy.
  • Buy Cheapest buy xanax cheap medication Now WorldWide Shipping. Buy Medications Online.
  • Buy Cheapest cheap viagra pill Online Online Medical Shop. Best Online.
  • Buy Cheap fat burning supplements Online Pharmacy Store. No Prescription Needed.
  • Buy Cheap valium generic Now Buy Medications Online. Cheap Pharmacy Online.
  • Buy Cheapest online pharmacy usa Online No Prescription Needed. Best Online.
  • Buy Cheap valtrex side effects Online Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheap phentermine in florida Now Pharmacy Store. Top Online Pharmacy Supplier.
  • cheap buspar Online Without Prescription Free Viagra Pills! Best Prices.
  • Buying Cheap generic 5mg proscar cheap. Mexican Pharmacy, Best Prices. Best Drugstore.
  • Buy Cheap buy xanax overnight Now Discount Online Pharmacy. Free Viagra Pills!
  • Buy Cheap prescription antidepressants Online WorldWide Shipping. Free Viagra Pills!
  • Buy Cheap orgasm with levitra Now Discount Pharmacy Online. Best Drugstore.
  • Buy Cheap order cialis online Online Best Drugstore. Buy Medications Online.
  • Buy Cheap affects of viagra Now Low Prices. 24/Internet)(safe Pharmacy.
  • Buy Cheap parasitic helminths Now 24/Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap cheap arthritis medication Online WorldWide Shipping. Cheap Pharmacy Online.
  • Buy Cheap ultram 50mg buy Online Low Prices. 100% Satisfaction Guaranteed.
  • Buy Cheapest fertility treatment guidelines Online Online Medical Shop. WorldWide Shipping.
  • Buy Cheapest order xenical cheap Online Best Prices. Discount Pharmacy Online.
  • Buy Cheapest valium withdrawl Online Best Drugstore. Cheap Online Pharmacy.
  • Buy Cheapest propecia ordering Now Pharmacy At The Best Price! Best Online.
  • Buy Cheapest atenolol withdrawal Online Drugs, Health And Beauty. Best Online.
  • Buy Cheapest diet pills online prescription Now Top Online Pharmacy. Cheap Online Pharmacy.
  • Buy Cheapest valtrex side effects Now Guaranteed Shipping. WorldWide Shipping.
  • Buy Cheapest codeine prescriptions for cough Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest viagra sale Now Special Prices For viagra sale! Low Prices.
  • Buy Cheap erectile dysfunction syndrome drugs Online Best Internet. Special Prices For erectile dysfunction syndrome drugs!
  • Buy Cheap online levitra Now No Prescription Needed. Top Online Pharmacy.
  • Buy viagra canada Without Prescription Doctor. Best Internet. Best Prices.
  • Buy Cheapest purchase viagra Now 24/Online Pharmacy. Best Drugstore.
  • Buy Cheapest phentermine websites Online WorldWide Shipping. Pharmacy Store.
  • Buy Cheapest effects of norvasc Online Drugs, Health And Beauty. Best Online.
  • Buy Cheap viagra sildenafil oral jelly Now No Prescription Online Pharmacy. Low Prices.
  • Buy Cheap medication on line Online Pharmacy Store. Discount Online Pharmacy.
  • Buy Cheap pain meds buy cheap Online Cheap Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap ativan online Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest fat burners Online Best Prices. Cheap Online Pharmacy.
  • levitra information Online Without Prescription Best Drugstore. Low Prices.
  • Buying Cheap lexapro antidepressant. Mexican Pharmacy, Best Prices. Best Drugstore.
  • Buy Cheap purchase proactive acne solution Now Online Medical Shop. No Prescription Needed.
  • Buy Cheap online shopping coupons for vitamin shoppe Now Top Online Pharmacy. Cheap Pharmacy Online.
  • Buy Cheap xenical orlistat Now Top Online Pharmacy Supplier. Low Prices.
  • Buy Cheapest levitra alternative Now Best Prices. Order Cheap Meds Without Rx.
  • Buy Cheap effects of xanax Now Top Online Pharmacy. Drugs, Health And Beauty.
  • Buy Cheap cheap tramadol Online No Prescription Needed. Best Internet.
  • Buy Cheapest lipitor reaction Now Discount Online Pharmacy. Best Online.
  • Buy Cheap reliable online pharmacy ativan Online Best Online. 24/Internet)(safe Pharmacy.
  • Buy Cheapest ambien without prescription Now Pharmacy Store. Online Medical Shop.
  • Buy Cheap viagra amsterdam Online Free Viagra Pills! No Prescription Needed.
  • Buy Cheapest no prescription diet pills sale Online Online Prices For no prescription diet pills sale! Best Online.
  • Buy Cheapest free sample of herbal cialis Now Best Prices. 100% Satisfaction Guaranteed.
  • Buy Cheap ultimate weight loss Now Online Prices For ultimate weight loss! Guaranteed Shipping.
  • Get order xanax overnight shipping Without Prescription Consultation. 24/Online Pharmacy.
  • Buy Cheapest phentermine cheap online Online Best Prices. Buy Medications Online.
  • Buy Cheapest clomid 25mg Now Best Internet. Online Prices For clomid 25mg!