How I got started programming?

July 8th, 2008


How did you get started in programming?

I started programming when I was 8 or 9…. I started using computers from the Apple ][ & ][e’s that were at Sherman elementary with Apple Basic… After conquering that, I was able to start using a CP/M based system with Dual 8″ floppy’s, and started working on their version of basic…

About a year later, the Timex Sinclair ZX-80 was conquered… For fun, try to make a graphical version of monopoly on the Timex Sinclair… That has to fit within 16K, and runs off the cassette loader….

Other computers followed, but I did not started any serious projects until after switching to White Box PCs… And starting Matrix Technologies…. I started writing Bulletin Board Utilities, and eventually started helping maintain, and develop QuickBBS….

Sadly, due to a variety of issues… Most significantly my development box dying, work overload, and too much stress caused a re-evaluation of my QuickBBS development…


What languages have you used since you started programming?

This is tough. Apple Basic, QBasic, 68xxx Assembly, MS Pascal, Turbo Pascal (one of my favorites), C (Blah!), AppleScript, Python (my favorite). I have forgotten even more languages, including CBasic, QBasic, etc…


What languages do you plan to work on learning?

I keep planning on sitting down and working through Objective-C. But my dislike of C, and lack of free time keeps forcing me to back burner this….


What’s the most fun you’ve ever had programming?

I have had a lot of applications that I have enjoyed programming, even had fun with… The Indigo Security script has been a AppleScript pain, but has been fun in expanding my Applescripting experience…

The Software Licensing software kit that I worked on a few years back was a cross-platform Python bash! Involving ODBC, Windows specific code, Macintosh Specific code, Unicode, and ReportLab (PDF Library) riots… I learned a heck of a lot regarding Unicode, and while frustrating it was really satisfying…


If there is one thing you learned along the way that you would tell new developers, what would it be?

While being cynical, it is something to be aware of. Just because you write your new software package, does not necessarily mean you will be able to make a living off a shareware software package.

Keep programming because of the love of product, and don’t allow yourself to become a slave to a particular project. My 4 year daughter keeps reminding me that there is a world away from the computer. It’s important to be able to get up from the programming chair, stretch your legs, and step away for a few minutes…

Also Document your code! I can’t say this enough… Documenting is the most annoying but needed part of any project. I eventually started a format that I liked, and it has saved me so much time and energy.

Help yourself in the future by adding a sniplet of code in your documentation that demonstrates how to use the function / module / subroutine… While this isn’t immediately helpful, in 6 months, you’ll come back and there maybe a nagging question on how the routine passes data… And the example will be helpful…

- Benjamin


The idea for this post came from Toxic Software’s blog ( http://feeds.feedburner.com/~r/toxicsoftwarecom/~3/329523457/ )….

New Beta of Indigo Security Script (v1.65a)

July 1st, 2008

New Features include:

– Version History

– v1.65 - Added Speech Support

– - Added Speech support for Open Sensor, and Closed Sensor detection.

– - Added Ignore Flag (Alarm Matrix #6 Option)

– - Allows the owner to have the sensor in the list, but to ignore any input from the sensor.

– - Generally used if the sensor is sending out false positives (eg. High Winds, etc)

– - False equals Do Not Ignore. True equals Ignore.


– Speech Controls



property Speak_Alarms : false

property Sensor_Speech_Text : {”Sensor %s has Opened”, “Sensor %s has Closed.”, “Sensor %s Time Out”}

– %s is replaced with the Sensor Name.

property Speech_Voice : “Alex”



Please feel free to send any feedback regarding this to me….



- Benjamin


security sample v1_65A.scpt.zip

Indigo Security Script v1.50A

May 28th, 2008

This is the newest version of the Indigo Security Script…

This now includes code that will check for out of date heartbeats (ie. Defective Units, or low/out of Battery) and either warn via Growl, Indigo Log File, or even Email!

Some of these changes were suggested by Scott Buchanan… And some where added after examining the Battery Dead Notify script from the Perceptive Automation User Contributed Scripts web page.

version 1.5 Changes

- Added Heartbeat inactivity detection (5/28/2008)
- Growl Support for Heartbeat inactivity detection
- Email on Heartbeat inactivity
- Added optional switch (Update_Heartbeat_After_Actions) to allow heartbeat to be updated after every action.

Added the following variables:

- Inactivity_Heartbeat_Watchdog
- Update_Heartbeat_After_Actions
- SE_IBeat_Address
- Send_Email_on_Inactive_Heartbeat

The new properties are:

property Inactivity_Heartbeat_Watchdog : 7200
– The maximium number of seconds before a warning will start appearing for an alarm heartbeat. If you receive an inactivity warning, please check the batteries, and test the contacts. The Deafult is : 7200 seconds = 120 Min = 2 Hrs before a inactivity warning will start logging.

property Growl_Notifications_List : {”Opened”, “Closed”, “Check Alarm”} — List the Growl notifications that you wish to use

– Advanced Settings
property Send_Email_on_Inactive_Heartbeat : false
– Send an email if the security Heartbeats have not been detected within the Watchdog value.

property SE_IBeat_Address : {”example@example.com”, “example2@example.com”}
– Send Email(s) to the following addresses, seperated by a comma.

property Update_Heartbeat_After_Actions : false
– Update the heartbeat after every action. Normal behavior is to not update Heartbeats after an action occurs. This forces the heartbeat to update after every action of the device.

Please feel free to use the script, I have just tested the email functionality…. And I have been using this script for the last few days, without any issues…

security sample v1_50A.scpt.zip

Macworld | Microsoft to bring back Visual Basic in Office for Mac

May 13th, 2008

(See Macworld of the complete article…)

Macworld | Microsoft to bring back Visual Basic in Office for Mac

In summary, Microsoft will be adding VBA support back into Office, but the next version of the office suite (”VBA will return to the next full upgrade to the Mac version of Office”).

Wait a second, the next version of the office suite. Not a service pack, so we will have to wait until somewhere around 2010 - 2011 before we can use VBA on the Macintosh again.

First of all, the lack of VBA can seriously hamper interoperability between the Windows version & Macintosh version of Office. Is the finance dept really going to make a second version of your spreadsheet for Macintosh users? We have enough problems with people creating Web Sites that require Active X controls, I don’t think we will be able to win the fight over spreadsheet VBA usage….

If this is Microsoft’s level of commitment to their Macintosh users then we have to question the amount of resources that they are given, and their priorities.. This entire VBA fiasco is guaranteed to have a negative effect on Mac Office’s market share….

From Fortune, March 25, 2008 (http://bigtech.blogs.fortune.cnn.com/2008/03/25/microsoft-looks-to-cash-in-on-the-iphone/).

The Mac unit’s work certainly isn’t charity – it delivers millions of dollars in profit for the company with its Mac version of the Office productivity suite. Microsoft doesn’t break out exact numbers, but we can extrapolate: Gibbons said the Mac Business Unit provides about a third of the revenue for the Specialized Devices and Applications Group, which also includes Windows Embedded, Microsoft Hardware, the Automotive Business Unit and Microsoft Surface Computing; the whole group did more than $1 billion in sales last year. So it’s reasonable to guess that the Mac unit provided about $350 million – and since Gibbons said the Mac group was one of the group’s more profitable units, it’s possible that Microsoft made somewhere in the neighborhood of $200 million in profit from Mac software.

Maybe it is time to start to re-evaluate the Macintosh dependency on Microsoft, after all, Pages (iWork) can open Office XML files…. Same with Numbers, and Keynote. If Excel can’t open VBA, neither can Numbers, but Numbers is significantly more stable, and about 1/3rd of the price and supported by Apple.

- Benjamin

Pets on lap while driving may soon be a no-no in Calif. (AP)

May 6th, 2008

Pets on lap while driving may soon be a no-no in Calif.
(AP)
: “AP - Pull over and put down the dog. A California lawmaker wants to ban motorists from holding pets on their laps while driving and getting caught can net a $35 fine. The bill passed the Assembly on a 44-11 vote on Monday, and heads to the Senate.”

(Via Yahoo! News: Top Stories.)

Here’s my view on this….

A $35 dollar fine means that this is intended as a revenue gathering scheme instead of actually attempting to stop people from driving with their pets unsecured.

Quite simply most people that drive with their pets unsecured are not going to worry about a $35 fine, until it occurs. Even then, they may stop for a short while after being caught, but will probably not stop in the long term.

Here’s the California government attempting to mandate common sense. It just doesn’t work…

(More on FrontRow with Indigo later….)

Indigo & FrontRow

April 29th, 2008

Folks,I promised that I was working on this, and here is a screen capture of the proof of concept of Indigo working via FrontRow.

HomeStatus-Frontrow.jpg

What you are seeing right now, is just a display of the status of the devices in Indigo.I still have significantly more work to do on it, including figuring out the best way to handle the storage of the user / server credentials, and other issues…But, we are certainly closer than we were a few days ago.

Bootable flash key makes disk encryption attacks super-simple

March 4th, 2008

From Engadget… (Which got it from hack a day)

Bootable flash key makes disk encryption attacks super-simple: “

Filed under: , ,

Ruh roh, Shaggy — you remember that disk encryption attack that involved cooling off your target’s RAM and yanking it to get a bitdump before the contents faded? Well, it looks like things just got a lot simpler for would-be attackers — check out this USB flash key designed by security researcher Robert Wesley McGrew, which can boot your machine and dump the RAM to itself without altering its contents. That means you no longer need to actually pull the DIMMs or carry around an air duster; all an attacker needs is enough time to reboot your machine and copy the contents of your RAM. Of course, that takes time — McGrew says things are running quite slowly right now, but he suspects his test machine is dropping down to USB 1.0 speeds. That’s still not too reassuring — looks like we’ll be spending even more time with our machines from now on.

[Via Hack a Day]

(Via Engadget.)

Security Script for W800RF32 & Indigo

February 20th, 2008

Here’s the v1.00 revision of the Indigo Security Script sample.

The Changes included here are:

* Fixed bug in the Chime code that would not reset the Chime_Last_Sounded_ms value properly.
* Added the date back to the XXXXX_Last_update value.

- Benjamin

Security_Script-100.zip

The Adventures of Systems Boy!: Delayed ACK Startup Item for Intel Macs

February 20th, 2008

The Adventures of Systems Boy!: Delayed ACK Startup Item for Intel Macs: ”
Delayed ACK Startup Item for Intel Macs
MacFixit just reported about troubles the new Intel-based Macs are having with network speeds, particularly AFP connections to, of all things, other Macs. The solution, they report, is to set the delayed_ack property to 0. In order for this change to survive a reboot, however, they recommend editing /etc/rc. The problem with this is that, often, edits made to /etc/rc will be overwritten by future updates to Mac OSX. In my experience, such modifications are better handled with a startup item, which is also a lot easier to add and remove. So I’ve suggested as much to the fine folks over at MacFixit, and I’ve even put my money where my mouth is. I’m offering to those who need it this delayedACK Startup Item, hand made by yours truly.

The linked disc image contains the delayedACK Startup Item, and also includes an installer and an uninstaller for the Startup Item.

Enjoy, you lucky Intel Mac owners (of which, alas, I am not one… Yet…)

UPDATE:

(Via .)

Security Script for W800RF32 & Indigo

February 17th, 2008

Here’s a revision of the Indigo security script sample, that adds GROWL support, X10 Chime support, and the data is stored in a array/matrix.

Please be Kind… This is the first major Applescript that I have done… So any suggestions on improving it, are welcome…

The key to customizing this script, is as follows:

1) Use_Growl, if true, Growl notifications will be broadcast for any Opened / Closed events. If False, no Growl notifications will be sent.

2) The X10 Chime support is activated on a Alarm by Alarm Basis… (See Alarm_Matrix)

3) The Chime can be set to only be activated on a OPEN status change
4) The Chime can be set to not activate until xx minutes have past since the last chime.
(For example, I trigger the chime by opening the door to take the trash out… I don’t
want the chime to go off again until 3 minutes later… That way when I come back in
the chime won’t go off… The Growl notifications & log entries are still created,
the chime just doesn’t go off..)

5) The Alarm’s to monitor are stored in a array…
The array stores the Alarm ID, the English name that you want to use in the
log & growl notifications (NO SPACES IN THE English name!). The Growl notification
flag for each sensor, the chime flag for each sensor, and the Indigo label for the chime module.

– 1 - Device ID
– 2 - English Name,
– 3 - Growl flag
– 4 - Chime flag
– 5 - Indigo Chime Device ID (Label)

Example:

property Alarm_Matrix : {¬
{9, “Test_Sensor”, true, true, “G01 = Remote Chime”}, ¬
}

- Benjamin

Here’s the code ZIPPED…new security sample 2.scpt.zip

And in plain text…

-- 153 is Kitchen Door
--  45 is Garage Door
-- 217 is Dinning Room
property Use_Growl : true
property Growl_Notifications_List : {"Opened", "Closed"}
property Growl_Enabled_Notifications : {"Opened"}

property Chime_Only_On_Open : true
property Chime_Min_delay : 3
-- 1 - Device ID
-- 2 - English Name,
--  3 - Growl Enabled
--  4 - Chime
--  5 - Chime Device ID (Label)

property Alarm_Matrix : {¬
	{9, "Test_Sensor", true, true, "G01 = Remote Chime"}, ¬
	{153, "Kitchen_Door", true, true, "G01 = Remote Chime"}, ¬
	{45, "Garage_Door", true, true, "G01 = Remote Chime"}, ¬
	{217, "Dining_Room", true, true, "G01 = Remote Chime"} ¬
		}

-- Send Growl Notification
on Send_to_Growl(door, action)
	tell application "GrowlHelperApp"
		-- Make a list of all the notification types
		-- that this script will ever send:
		set the allNotificationsList to Growl_Notifications_List
		set the enabledNotificationsList to Growl_Enabled_Notifications

		register as application ¬
			"Indigo Security" all notifications allNotificationsList ¬
			default notifications enabledNotificationsList ¬
			icon of application "Script Editor"

		notify with name ¬
			action title ¬
			door & " " & action description ¬
			door & " " & action application name "Indigo Security"
	end tell
end Send_to_Growl

using terms from application "IndigoServer"
	on Set_Variable(variable_name, variable_value)
		if not (variable (variable_name) exists) then
			make new variable with properties {name:variable_name, value:variable_value}
		else
			set value of (variable (variable_name)) to variable_value
		end if
	end Set_Variable
end using terms from

using terms from application "IndigoServer"
	on decode_security(eventType, device_ID)
		set door to ""
		set action to ""
		set alarm_detected to false
		set growling to false
		set chiming to false
		set chime_device to ""

		repeat with alarmdata in Alarm_Matrix
			if device_ID is item 1 in alarmdata then
				set door to item 2 in alarmdata
				if eventType is sec_SensorNormal_min then set action to "Closed"
				if eventType is sec_SensorAlert_min then set action to "Opened"
				set alarm_detected to true
				set growling to item 3 in alarmdata
				set chiming to item 4 in alarmdata
				set chime_device to item 5 in alarmdata
			end if
		end repeat
		return {door, action, alarm_detected, growling, chiming, chime_device}
	end decode_security
end using terms from

using terms from application "IndigoServer"
	on receive security event of eventType with code devID
		--		if eventType is sec_ArmHome_min then log "arm home (min)" using type "Security Sample"
		--		if eventType is sec_ArmHome_max then log "arm home (max)" using type "Security Sample"
		--		if eventType is sec_ArmAway_min then log "arm away (min)" using type "Security Sample"
		--		if eventType is sec_ArmAway_max then log "arm away (max)" using type "Security Sample"
		--		if eventType is sec_Disarm then log "disarm" using type "Security Sample"
		--		if eventType is sec_Panic then log "panic" using type "Security Sample"
		--		if eventType is sec_LightsOn then log "security lights on" using type "Security Sample"
		--		if eventType is sec_LightsOff then log "security lights off" using type "Security Sample"
		--		if eventType is sec_SensorNormal_min then log "sensor normal (min delay)" using type "Security Sample"
		--		if eventType is sec_SensorNormal_max then log "sensor normal (max delay)" using type "Security Sample"
		--		if eventType is sec_SensorAlert_min then log "sensor alert (min delay)" using type "Security Sample"
		--		if eventType is sec_SensorAlert_max then log "sensor alert (max delay)" using type "Security Sample"

		set alarm_detected to false

		set decoded_data to decode_security(eventType, devID)
		-- door, action, alarm_detected

		set chime_device to item 6 of decoded_data
		set chime_enabled to item 5 of decoded_data
		set growl_enabled to item 4 of decoded_data
		set alarm_detected to item 3 of decoded_data
		set action to item 2 of decoded_data
		set door to item 1 of decoded_data
		if alarm_detected is false then
			-- Unknown Security Device
			log "(device ID " & devID & ")" using type "Security Sample"
		else if alarm_detected is true then
			log (time string of (current date) as string) & " " & door & " " & action
			if action is "Opened" then beep

			-- Send Growl Notification
			if Use_Growl then
				if growl_enabled then Send_to_Growl(door, action)
			end if

			if chime_enabled then
				set last_chimed_ms to value of variable "Chime_Last_Sounded_ms"
				if (time of (current date) ≥ last_chimed_ms + (Chime_Min_delay * 60)) then
					if Chime_Only_On_Open is false then
						turn on chime_device for 1
						Set_Variable(("Chime_Last_Sounded_ms"), time of (current date) as string)
						Set_Variable(("Chime_Last_Sounded_ms"), time string of (current date) as string)

					else
						if action is "Opened" then
							Set_Variable(("Chime_Last_Sounded_ms"), time of (current date) as string)
							Set_Variable(("Chime_Last_Sounded"), time string of (current date) as string)
							turn on chime_device for 1
						end if
					end if
				end if
			end if

			Set_Variable((door & "_last_update"), time string of (current date) as string)
			Set_Variable((door & "_last_status") as string, action as string)

			--log value of variable "SoundChime" as string

		end if
		--log "(device ID " & devID & ")" using type "Security Sample"

	end receive security event
end using terms from