Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, December 18, 2013

WAID - What Am I Doing?

WAID repo

Recently my workplace started being serious about requiring time tracking. While I understand the numerous benefits, I'm not a fan of actually doing it. A way to turn it into an opportunity was to create my own time tracking application. So a few months ago I started waid. Waid (What am I doing?) as yet another command line time tracker. All that makes this project special to me is that I'm writing it, and I'm writing it in Go.

I've been interested in Go since I saw some talks from Rob pike at Google IO in 2012. However, At this point for me profess appreciation go for any thing other than Go's aesthetics would be bullshit. I haven't worked in the language long enough or written anything that compares to the size of applications I work on in Ruby. I like a lot of the ideas that Go incorporates, but my appreciation is superficial. Waid presented a perfect opportunity to do something not quite trivial in go.

At this point waid handles all the stuff I wanted it to do initially. It can: start and stop a time, add an entry, clear a list, list my time with a summary. And I've gained some valuable experience, and some basics of creating something larger than a hello world program in go. The verdict is that I have a long way to go until I understand how larger Go programs are put together, and what proper Go code looks like. But whatever, its a different paradigm, and I'll just need more experience.

Future work

Luckily there are some things that I'm looking to add/fix such as richer entry editing, and handling. Most especially I want to make a companion server application that keeps the entries the same across multiple computers.

I'm really excited. This will expose me to a lot of aspects of writing we applications in Go that I wasn't sure how to approach before. I'm looking forward to learning about stuff like: deployment, configuration, authentication, etc.

More to come.

Thursday, July 18, 2013

The Cursor

blink
blink
blink

I'm on the hunt

blink
blink
blink

Through logs
Through source code

blink
blink
blink

The issue is inscrutable
The solution is unknown
The path is certain

Cursor be my guide

blink
blink
blink

Getting the Hang of Go

I'm starting to really enjoy writing go. I've been working on a command line app that I'll "release soon" (it's already free(dom) but I'll write something up about it), and I'm starting to get familiar with the basics of writing a non trivial application. I haven't had the opportunity to explore the parts of go that make it really awesome (concurrency in particular), but I already see some advantages.

The process of updating and install the source and binary across all the machines I've been using has been very easy. No need to write a gem file or any similar package. It's all built into the go command.

Now that I'm familiar with the typing system I can make changes to improve the program and with confidence expect the complier not to yell at me.

In short, go is fun so far, easy to create command line applications, even light weight ones. I'm definitely going to find more ways to use it.

Friday, June 14, 2013

Java: the bane of computer science freshmen

I didn't start programming until college. My first programming language was Malab/Octave. I fell in love over spring break when I was able to spend the entire week writing and debugging what in retrospect was a very simple program. Octave seemed impenetrable at the time, but my first couple classes after switching to Computer Science had me pining for its simplicity.

Like many other beginning Computer Science classes Java was the class language. And like many other programmers I found it frustrating. The problem is that Java is just not a good a good language for new programmers to learn with. Its verbose; the core library has many redundancies, yet is also is missing many useful features; and virtually requires an IDE.

Java requires a lot of handwaving to achieve the simplest thing. Assigning properties of an object will just about require as many lines as properties. Binding events, running code on a new thread, even reading from a file seem to require way more lines than it should. Complaining about much code might seem like a whining, but with an inexperience programming it can be a showstopper.

Anyone who has written a non trivial Java program can attest that import statements quickly get out of control. My project to create an Android audio book player averages 10% of the lines being import statements. I'm not a full time Java developer, so to avoid looking up Java packages every ten minutes I use eclipse because it auto imports and remove packages based on use. Asking a brand new programmer to use anything more complicated than the command line and a text editor is counter productive. It adds another layer of difficulty to what is already a difficult task, learning about computing.

In some sense these problems aren't a design flaw. Java wasn't created with simple use cases in mind. The use case that the designers had in mind was hundreds or thousands of programmers working on the same project or platform. Code portability and modularity, as well as engineer interchangeability are key design objectives. In those situations the character of Java and the use of IDE's are much more useful.

However, in an academic context, especially early on, the conventions of Java are an impediment. Languages like Ruby, Python, or Go (although new) make a lot more sense in this context. The syntax of these languages is simpler, and in Ruby's case more forgiving. In most cases Java gets in the way of learning concepts.

Over the last couple of years I've reintroduced several friends to programming. They were frustrated by Java, there just wasn't enough success or it wasn't worth the Herculean effort to print "Ross is cool". However after sending them to tryruby.org. They become excited by the same joy I feel when creating something from thought. To me these instances are decisive.

Wednesday, May 29, 2013

Launched My Site

c0d3it.co

After a few months of basically screwing around, I have finally launched my personal site. I wanted to do more than have a blog on it, since you know I have this blog. And I've been less interested purely browser client based stuff lately.

There were a few hiccups  but now I have a pretty solid workflow set up. And I'm excited to make new things and share them.