Simon Rentzke

Blue Blistering Barnacles

1989 - 1996 : The Golden Years

James Blake - Retrograde

First Lesson: Drawing a diamond with Ruby

I was reminiscing recently about what my programming exercises were at high school. I started on Turbo Pascal.

This is was one of the first, simply to draw a diamond shape, that looked like this:

          *
         ***
        *****
       *******
      *********
     ***********
    *************
   ***************
  *****************
 *******************
*********************
 *******************
  *****************
   ***************
    *************
     ***********
      *********
       *******
        *****
         ***
          *

I remember it taking forever, but loving it. So decided to write it out in ruby.

s = 10
(-s..s+1).each do |y|
  (-s..s+1).each do |x|
   print x.abs + y.abs > s ? ' ' : '*'
  end
  puts
end

Alternative solution: s = 10 s.times {|u| puts ' ' * (s - u.to_i) + '*' * (u + u.to_i) } s.downto(0).each {|u| puts ' ' * (s - u.to_i) + '*' * (u + u.to_i) };

Junip - Your Life Your Call

Slime Mould Maze

Recently I attended a workshop at the Edge on 3D printing and slime mould.

The event's title was so whack, that I signed up - not knowing what to expect.. This is what we did:

First, an intro to 3D printing. We create a maze in TinkerCad

TinkerCad, was until recently going to shut down, but luckily AutoDesk bought them out.

It's a fantastic way to ease into CAD, and produce 3D printable things. Within 5 minutes I grasped how to use it. Super simple.

tinkercad

Then we made some Agar, chucked the 3D maze in to a petrie dish, and dropped a piece of ravenous slime mould into the middle of it, with some rolled oats.

slime mould

Then I hid my slime mould in a dark box, and 2 days later - my simple maze looked like this - solved!

slime mould solved maze

This is a fascinating timelapse video, of slime mould's ability to actually solve the maze intelligently.

La Haine - Assassin de la police

Quickest way to determine the state of a rails app?

As a contractor, I'll never say yes to a project before doing a code review. Saying that, I still enjoy taking on disaster code bases. But in order to manage expectations from both sides, this is my TODO list of things to check and report back on, before saying yes.

Setup

  • Does it have a Gemfile?
  • Does it use a README?
  • Does the seed file work?
  • Do the migrations or schema.rb work?

Tests

  • Does it have any?
  • Do they pass?
  • Does it test the model logic?
  • Do they use a CI server?

Code

  • Do they have have decent commit messages?
  • Are there models/controllers that aren't used anymore?
  • Are there decent comments?
  • Do they store passwords in plain text (you'd be suprised)?

Environment:

  • How big is the team?
  • Is there a product owner?
  • Do they have a future plans, or do they need you for putting out fires?
  • Do they have a bug tracker?
  • Do they have a task board?
  • Are you going to be responsible for support calls?

8 Steps to become a Web Programmer

My brother asked me about how to get something on the web. "Should I use wordpress?"; "Should I use Joomla?", "Should I use ...."

I figured it'd be so much more valuable to take the time to learn the basics of the web. So I quickly jotted down a few steps on how to start out and then gradually move on to the more grungy world of programming.

Step 1: Basics of HTML, CSS

Know how to create basic markup, and stylesheets. In order to learn this I'd start by creating a personal page, for example your Resume/CV. Don't use a fancy editor, use Notepad++(PC), or Textmate(Mac) or my favourite Sublime Text.

If you'd like more info on HTML have a read through Dive into HTML5

Step 2: Advanced CSS

Get a simple understanding of each CSS feature

Step 3: Push it live to the world

Sign up to Github, and push your html site to GitHub pages.

Step 4: Learn a Clean Programming Language

If you've got the hang of the last few steps, you'll be itching to learn more of the more grungy stuff. So I'd kick off by learning a beautiful language like Python or Ruby. I would start with the wonderful TryRuby

But here is a comprehensive list if you arent comfortable with that 'best ways to teach a beginner to program'

5. Step 5: Stackoverflow.com

Get an account, start asking questions. Programmers are amazingly willing to help everyone in the community.

Step 6: Server Side Web

Pick a server side web language like php, ruby, python. I'd recommend Ruby on Rails a web framework. Try and build something simple that has the need for storing data on the server, for example a blog.

Step 7: Javascript/Jquery

Go back to the Web. Learn the basics of javascript, and if you get bored get some knowledge of jQuery, and learn all the magical things you can do on the client side. Check out the Mozilla Developer Network

Step 8: Database

Learn the basics of SQL, and have a play with entity relationships, has-many, and one-to-many relationships. I'd use sqlite, or postgreSQL.

Twitter Credit Card

I like credit cards, I base my whole month on not caring about if I have cash in my current account, and put my whole earnings into a savings account. This doesn't earn me a ton of money, but it's more efficient, and like efficiency, it gives me a buzz.... nerd

I grew up in Cape Town, and about 10 years ago got my first credit card, it was pretty easy to get, my pops signed surety and the bank gave me a whopping $1500 limit, I had no job or anything.

Forward a few years, I went to the States, to a place called South Lake Tahoe, received a credit card again - with the promise of a Job and a passport - they gave me a limit of a couple of hundred dollars. Sweet!

Forward a couple more years, I was living in London, I was working full time, and found it quite difficult to get a credit card, they eventually gave me one when armed with an folder full of proof-of-address statements, they gave me a measly £200 limit.

Forward another few years, and here I find myself living in Brisbane, Australia... Once again trying to get a sacred Credit Card. Turns out, it's impossible, I have a fulltime job, a partner visa... and more money than I've ever had. WestPac, Amex and ANZ - all deny me a card... For what reason I'm not entirely sure...

So, out of options, I turn to twitter :

... within 20 minutes a NAB bank official is on the phone to me. Within 2 weeks, I have a credit card...

Twitter Customer Service when done right is the best customer service you could ever get.