Thursday, September 19, 2019

Kronos - The beginning

After my stint working as a contractor on the IBM + Raytheon project, a friend of mine I knew from church who happened to know I specialized in Smalltalk reached out to me and got me an interview at Kronos, Inc. where they made time and attendance products.  They hired me as a contractor.

Kronos was the market leader in this space and their breakthrough product was the combination of digital punch clocks with a magnetic card strip reader and an application developed in C to process all the data of employees coming and going.

Before I went there they had created a new version of their system called TimeKeeper C/S which was developed in Smalltalk.  The C/S part stood for Client/Server, so Smalltalk application used a SQL Server database as its backend.

My task on this contracting job was to develop an extension to their TimeKeeper C/S application.  Because they didn't have a database resource to work with me, I developed a dynamic object persistence system that was file based, and I also created a dynamic user interface mechanism to present application windows based on metadata.

It was an interesting project and the work paid well.  Later on the contacts I made would help me again and again.

After the contract period was finished I went back to working on Liberty BASIC again.

Fractals in one page of code - Redux

Some time back I blogged about how someone wrote a one page program in Just BASIC that draws a colorful fractal image.

And I quote (myself):

"What's great about BASIC and languages like it is that you don't have a write a lot of code that has nothing to do with what you're trying to create (like Java for example). It should be really easy to throw together a little code and play with graphics. Programming should be fun, not a burden.

Here is a thread that shows how to draw fractals in less than a page of BASIC."

But the link is now broken because the forum site shut down and we lost a lot of good stuff.

Here's where we make it right.  A few months ago I found a fractal example for the Apple II written in Applesoft BASIC.  I thought it was pretty cool, so I adapted it for Liberty BASIC.

startMS = time$("ms")
WindowHeight = 230
open "mandelbrot set" for graphics as #gr
#gr down()
#gr fill("black")
color$ = "red orange yellow green blue red orange yellow green black"
for x = 0 to 279
for y = 0 to 95
  x1 = x / 280 * 3 - 2 : y1 = y / 191 * 2 - 1
  i = 0:s = x1:t = y1
    while i < 20 AND s * s + t * t < 4
      s1 = s * s - t * t + x1
      t = 2 * s * t + y1:s = s1: i = i + 1
    wend
  c = i/2
  #gr color(word$(color$, c + 1))
  if c <> 0 then #gr set(x, y) : #gr set(x, 191-y)
next y
next x
print "done in "; time$("ms")-startMS; " milliseconds"

Note: This is written to run on Liberty BASIC v5 to be one of the example programs.  LB5 is as of the time of this writing is in alpha test.  Click to visit the Liberty BASIC v5 board in our forum.