Ports

For all you Mac heads, programming nerds, and code monkeys read this article about porting BBEdit from PPC to x86 for the big, unfortunate Apple switch to Intel. Interesting stuff. The most being that it took them 24 hours to make their app cross-platform! Guh!

And that is why BBEdit rulez! As well as programming for the Mac. I need to get on the bandwagon.

Mac Programmer Blogs

I wish to be one one day. Here are a few blogs from people who code for Macs.

http://rentzsch.com/
http://mjtsai.com/blog/
http://inessential.com/
http://gusmueller.com/blog/
http://www.glorifiedtypist.com/
http://www.shirt-pocket.com/blog/index.php
http://www.unsanity.org/
http://wilshipley.com/blog/
http://www.mikematas.com/

This is just a few and it is mostly a scarfed from the blogroll in the first link. Also, don’t forget to read Jon Gruber’s Daring Fireball. This is my first read for insight into any Mac related news.

“This is just a standard management technique that has been used by personnel supervisors since the days of.. Ho Lu, grand emperor of the Wu dynasty.”

This is assignment 1 due during week 2, and it is related to this post for school. Download it from here in order to print it out.

In the early 1990s, a piece of telephony software written by the DSC Communications Corp. caused some phone outages across the United States. The root cause of the problem was traced back to a typing mistake. The bug occurred in three lines of a million line program. At the time, Frank Perpiglia, Vice President for technology and poduct development at DSC had said that the intended change to the software was very minor, and that it had been determined that the usual rounds of testing of the software was not needed. In hindsight, that was a bad idea.

Yet, to put the blame on insufficient testing is to ignore the other factors which contributed to the software bug. In fact, I would say that the problem really resides in the policies and procedures that allowed the developers to release their software with less than adequate testing. A symptom of this lack of quality-focused policies can be found in the cavilier comment from Perpiglia, “We had a small modification to make a small change. We felt that the change itself did not require three to four months of testing.” It was sheer folly to accept the risk of not testing the change.

First, let’s focus on DSC’s software configuration management policy, if they had one. A change was going to take place on their software. Was there a need for the change? Was the fix to address a bug or was it relatively minor? From Perpiglia’s statement, it seems that DSC deemed the fix to be a minor, inoccuous change. It probably was also somewhat necessary. I can’t believe that a simple patch of less than several lines of code would be released at the whims of the company. From this viewpoint, did software configuration management accept the necessity to change the software and at whose discretion?

Secondly, let’s take a look at this issue from the software developers position in relation to their processes and procedures. To make the change requires at least a minimal set of informal tests. Was there a procedure for code/peer review? Even in an informal setting with several peers and domain experts maybe the flaw could’ve been spotted. It literally was a typo that was the problem. At the least, was there a procedure to conduct unit tests on the change? Perhaps a unit test could’ve caught the flaw early exposing the unit under testing as not performing correctly. A set of procedures for the developers would’ve been helpful in spotting the problem.

Finally, focus should fall on the system test group. Risk was taken to not test any of the software, because running a full set of qualification tests was time consuming. Still, could they have developed a reduced set of tests to ensure that the change would not produce any bugs? They knew the functional area affected, they could’ve run a smaller set of tests specifically focused on that small requirements which were affected. Did they have sufficient tests for that functional area or was the bug the type where the code changes in one part of the program and wholly unrelated piece fails? Sometimes the a small set of tests would not uncover the bug, and the full complement of qualification test is needed to discover it.

In summary, the problem with the DSC software could be traced back to problems with the policies and procedures that were in place. They were lacking, because it allowed them to assume the risk that an insignificant change to their software would not produce any anamolies. DSC neither planned for the change, reviewed the change, nor adequately tested the change. It was not just the lack of test time that did them in, but a lack of focus on policies and procedures that would’ve helped them focus on delivering a quality product.

Can I get there in a few years?

I don’t write too much about work, because I have a suspicion that if the employer ever found out I posted stuff about the job on the web then they will let me go. Better leave things unsaid. But if you read my profile, you’ll know that I am a software engineer. Coding. I would love to get around and start writing code for the Mac. Look what programming for apple can do. Lots of cool apps. Anyway, when I have some free time, I think I might want to implement some stuff for the. We’ll see how it goes.

TextWrangler language modules

Speaking of smalltalk programming. I am using BBEdit’s younger, punky brother TextWrangler. I miss color coding. It seems you should be able to write a language module that gives me all the yummy goodness of syntax highlighting. I hoped that someone already has done one, but since I didn’t find an easy installation of smalltalk on Mac OS X, then I figured that there isn’t a big Mac smalltalk development community. Admittedly, I haven’t looked hard enough, but being lazy enough I hope to find something on these internets.

Any help, please, would be much appreciated.

Smalltalk is an interpreted language!

Well started my assignments for the OOP class. It’s a simple introductory to smalltalk programming. I have to create a derived class from another provided by the professor. When I “compiled” the file, and passed it to the smalltalk interpreter, I encountered a problem! Smalltalk did not like me using my instantiated object:

” My Main! “
| sa |

sa := SavingsAccount new initialize: 50.
sa postInterest: 0.05 .
sa inspect
!

>./gst ~/Documents/grad_school/ooProgramming722/dev/savingsAccount.st
“Scavenging… 15% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”

Not so good, hunh? I am sure you smalltalk gurus already see my problem. Besides running smalltalk as a program and not installing it wherever make install puts it. Hint for all you non-programmers: interpreted languages are read from start to finish at the time the program is run.

See it yet? My SavingsAccount is derived from another class Account. (Am I using the correct smalltalk terminology?) I am passing only the savingsAccount file to the interpreter, and I am missing it’s parent. How will smalltalk know what the parent class looks like? Smalltalk was able to interpret the object in this file by just creating instances of a generic object to take place of the SavingsAccount’s super class. I guess it doesn’t like garbage collecting in this scenario. I must read the oop.h file to understand why but for now passing the parent class on the CLI does the trick.

Compiling GNU smalltalk on a OS X

This is just for references, if anyone ever searches for compiling smalltalk on OS X in google. I was compiling the latest stable release, 2.1.9.

When compiling GNU smalltalk on Mac OS X, and you run into errors with poll.h, my suggestion is to comment the block of code which #includes sys/poll.h. You’ll find that the compilation will go more smoothly with the definitions in poll.h (the fake out section) rather than the definitions in sys/poll.h. In fact if you read, sys/poll.h it recommends you not #including it. Perhaps this is a bug and should be submitted to the maintainer of GNU smalltalk.

Source Search

The fellows over at Forwarding Address: Mac OSX linked to a site that allows you to search source code. Brilliant. This would come in handy when it is time to write some code. You can search many source listings of various languages for ideas. It should help as it gives examples of how to use operations. As a software engineer it would be nice to use as you learn from examples.

Game dev

This entry from a writer whose nom de plum is ea_spouse writes a lengthy post on what it is like to have your significant other work for EA Games. Most of it tells of horrid lengthy days spent in “crunch time” and no compensation for overtime work. My understanding of the game programming industry is that it was always like this. Except my understanding came when games were produced by small shops not the mega-development company that is EA Games. Working for the man sucks.

Mac development story.

Why don’t you hear more stories like this from Windows developers. Or do I read the wrong sites? I would guess it is that the Mac developer loves Macs and views the platform in a different way. They love it and write code because what better way to show your appreciation for the platform than to make cool apps for it. Money would be a secondary reason. Anyway, how do you get started writing Mac apps?