Tuesday, August 01, 2017

A couple of cheap Macintosh SE's

A friend found a bunch of Macintosh SE's at at recycling center a while ago (year?) and I was finally able to go and pick them up a couple of weeks ago.

Two Macintosh SE FDHD models and three dual DD floppy drive models.

One of the FDHD has been used as a server, and digging around the drive I was able to find out that they had been used at a school in Lahti in the 1990s.

Documents where dated around 1994 and some log files said 1996 so they have probably been unused for 20 years or so.

Apple Macintosh SE
I picked them up on the way to our summer cottage, so to be able to test them I grabbed, what I thought to be, a SCSI box with Mac System on it with me.

Unfortunately my memory had failed me and I took some other systems SCSI disk so I didn't have anything to boot from until I got back home. The server did boot up but directly into AppleShare. And obviously I didn't have any administrator password codes so I couldn't disable it.

Back home I got the right SCSI disk box connected and everything seems to work just fine.

You can see the price in the above picture, 10€ :) (And luckily for me I didn't need to pay anything for them, all free :)

Thursday, February 23, 2017

Coding don'ts: enourmous if blocks

When wading trough other peoples code I find these annoyingly large if structures, especially used inside while/foreach loops that check if some item is ok to process or not.

Especially in PHP code for some reason or another. It's like people don't know about continue.

Don't do this!

foreach ($something as $item) {
 if ($item) {
   ...
   .. screenfull of code ..
   ...
 }
}

Do this instead

foreach ($something as $item) {
 if (!$item)
   continue;

 ...
 .. screenfull of code ..
 ...
}