Full Stack Web Application with Node.js Tutorial

I’ve followed this tutorial personally, not using Mongo as the database at first. It’s clear and to the point and provides just what you need to know to get started. Highly recommended.

March 31, 2014 · 1 min · Neil Grogan

Programming is hard

A great essay on why programming is hard: It’s harder than you think. Right now you’re probably underestimating the amount of frustration and discomfort you’re about to experience, without realizing that by doing so you’re creating all sorts of subtle barriers to obtaining a deep understanding of programming. Language does matter I find this part extremely true: my first language is Java. Every programming language I’ve tried since has been through comparing it to Java. I’ve had criticism of each different language based on my assumptions. Scripting languages being prone to bad coding because they are not strictly typed, having to do tedious work with languages that require memory management (my time is too valuable!). ...

May 7, 2012 · 3 min · Neil Grogan

Very Simple Java Twitter Bot (Twitter4J)

Below is code for the start of a Twitter bot I am going to build in Java. It’s the most basic way of getting Oauth working (with any account, not just your developer account) and it shows your timeline and can update your status - that’s it for now. The neat thing is it uses Java’s awesome serialisation, so you only should have to authorise your twitter account once! What you will need: Twitter4j Libraries Oauth Consumer and Secret Key off twitter That is it! What the code does: Once only: ...

February 1, 2012 · 1 min · Neil Grogan

Output Percentage of File (Bash code)

I wrote this script recently for a friend in a job who needed to output a certain percentage of a log file, but no more and no less. This was in Linux using bash, so I had a go at writing a solution, which you see below. Posting this up in case it’s useful to anyone else! # !/bin/sh # Public Domain, by Neil Grogan 2010 # Script to output last 30% of file by lines OLDFILE="oldlog.txt" NEWFILE="newlog.txt" PERCENT=0.7 #Use wc to count lines LINES=$(wc -l $OLDFILE | awk '{ print $1}') #Linespercent = 2 decimal places, lines by percent, round to whole LINESPERCENT=$(echo "scale=2; $LINES*$PERCENT" | bc | xargs printf "%1.0f" ) # Use tail to get last 30% and output, can use tail -s with sleep time to have it run on sched. tail -n $LINESPERCENT $OLDFILE >> $NEWFILE

February 5, 2011 · 1 min · Neil Grogan

Technology New Years Resolutions

Some people make new years resolutions about eating healthier, exercising more etc. I find that boring, who doesn’t want to be healthier? So I am making a list of technology resolutions: Learn C in XCode on a Mac Make an awesome CRM program for College degree (Python, Google App Engine) Learn Vim and Emacs bindings, using them for code Learn to use Git, possibly mercurial Learn some Obj-C with Cocoa Learn some C++ with Qt Learn Python +Tcl/tk Learn more about the design of Linux kernel and study some of it’s code Do Sysadmin stuff on my server on Linode; like setting upSendmail,IRCServers and other stuff If I have time, investigate CakePHP, Django, maybe Ruby (on Rails?) and it’s ilk That should keep me busy besides college and working! I didn’t include any security stuff, as we’re doing best practice for my honours degree next year. If anyone has any of their own, I’d love to see, or any resources to help me complete my list ^-^ Happy 2010! ...

January 4, 2010 · 1 min · Neil Grogan

Why Should I Care What Color the Bikeshed Is?

“The really, really short answer is that you should not. The somewhat longer answer is that just because you are capable of building a bikeshed does not mean you should stop others from building one just because you do not like the color they plan to paint it. This is a metaphor indicating that you need not argue about every little feature just because you know enough to do so. Some people have commented that the amount of noise generated by a change is inversely proportional to the complexity of the change.” ...

December 7, 2009 · 1 min · Neil Grogan

Comp Sci - An Interview with Stanford's Undegraduate Professor

This is the guy who runs Stanford University Undergraduate programme. He talks about the future of computer science: Computer Science will evolve more than most other subjects as it expands into other areas, especially Biology and other areas people don’t normally associate with it Industry ties with Colleges are going to be very important Computer Science with Law is the next big area Thanks to Robert Scoble for doing the interview. ...

September 7, 2007 · 1 min · Neil Grogan