Tuesday, 24 June 2014

Link: Getting rid of intermittent feature spec failures

Intermittent feature spec failures are the bane of testing experience.

They cause builds to fail at random (which really screws with you when you have continuous deployment based on master-branch merges). But more insidiously, they lead to bit-rot in your test suite - because once you get used to tests failing at random, you tend to overlook it when they do... which leads to bad code falling through the cracks at the worst times.

Patrick Bacon's article: These Intermittent Test Failures Will Not Stand, Man has a small selection of useful things you can do to address these failures and root them out for good.

Wednesday, 18 June 2014

Rails migrations for zero-downtime sites

At TuShare we have a zero-downtime site with continuous deployment (ie, you merge to master, and away it goes to production...)

The zero-downtime part means that as the new code goes out, the old servers are still up and running until the new code is fully loaded and ready to roll... and they only then get pulled down.

This is great for uptime, but does mean you have to be extra careful about any migrations. The database must work with both the old code and the new code.

My colleague pointed me at this article: Rails migrations with no downtime. which has some in-depth coverage of the topic. What kinds of things cause errors, what you can do to reduce the pain of change-over.

Thursday, 12 June 2014

Working with TuShare

So, I've got a job at TuShare.

TuShare are a little like FreeCycle - people login to either give away their excess clutter, or get some free stuff from others.

But there is one main difference - instead of having to pick the items up yourself, TuShare offers seamless integration with a courier system for any items smaller than 5kg. You still have the option of going out to pick the item(s) up (which you still have to do for furniture and large objects), but you also have the option of a door-to-door courier service for only $10 within your capital city, or $25 for city-city service.

Personally, that extra convenience is extremely appealing to me, and I used it about a month ago to get myself a brand new-to-me juicer. Since then I've put up 6 items of my own, from random old computer bits to a futon left with me by a friend who moved house.

TuShare has a small dev team, but there's a lot to work on - especially after the boom in users following the Global Sharing Day events held last week.

The people are lovely and I'm really looking forward to working with them.

Tuesday, 3 June 2014

Link: Open-plan offices don't work

Just read an interesting article by Maria Konnikova called The open-office trap

The TL;DR version is that while open-plan offices give employees a feeling of belonging to an open, laid-back company. The actual measured performance of employees shows that they are "damaging to the workers’ attention spans, productivity, creative thinking, and satisfaction."

Wednesday, 14 May 2014

Link: Service Objects in Rails

Steve Lorek has written a nice overview of Service Objects: What They Are, and When to Use Them.

"There has been a lot of discussion within the Ruby community around the service objects pattern. The term "service objects" may be unfamiliar to even seasoned Rails developers, because Rails itself implements the Model-View-Controller design pattern. There is no concept of a 'service' in a new Rails application. So it's understandable that this concept may seem foreign, and indeed non-obvious. However, I believe that the service objects pattern is well worth considering for any non-trivial Rails application."

It's a quick read, and gives a very good introduction/overview to when and why to use service objects in Rails.


Further to the above. If you have a Railscasts-pro account, you can watch this video on Service Objects.

It starts with an example of modularising out the functionality of a FAT model, using concerns. He then describes why he doesn't prefer that approach (my first introduction to the brilliant phrase "grep-driven-development") and finishes up with an alternative using service objects instead.

It's Rails-3 oriented - so you know you don't have to do anything special to include the concerns directory anymore... but otherwise his examples are still quite relevant and a great intro to the practicalities of how to actually go about a simple service-object and/or modularisation refactor.


Finally, don't forget some of the classic articles on this subject from DHH's Put chubby models on a diet with concerns to Bryan Helmkamp's 7 Patterns to Refactor Fat ActiveRecord Models

Thursday, 8 May 2014

Thursday, 1 May 2014

Link: programming sucks

Programming sucks

"Every friend I have with a job that involves picking up something heavier than a laptop more than twice a week eventually finds a way to slip something like this into conversation: "Bro, you don't work hard. I just worked a 4700-hour week digging a tunnel under Mordor with a screwdriver."
"They have a point. Mordor sucks, and it's certainly more physically taxing to dig a tunnel than poke at a keyboard unless you're an ant. But, for the sake of the argument, can we agree that stress and insanity are bad things? Awesome. Welcome to programming."

:)

Tuesday, 22 April 2014

Classic: The Law of Leaky Abstractions by Joel Spolsky

Joel Spolsky's classic: The Law of Leaky Abstractions is still well worth a read today.

Many of today's high-level tools abstract away the low-level details to such an extent that 99% of the time, you don't even need to know they're there. But it's that 1% of the time that's the doozy. When everything suddenly blows up because you accidentally crossed an invisible line you didn't know was there... how can you figure out what went wrong and how to fix it?

The low-level detail leaks through.

So often, even though you're using an abstracted, high-level tool, you often still have to learn all the lower-level stuff it was helpfully abstracting way.

An example would be a need to learn sql in order to understand joins and includes (and how they go wrong) in Rails' Active Relation

Wednesday, 16 April 2014

Link: Female Founders by Paul Graham

Paul Graham (of Y-Combinator) writes some amazingly worthwhile essays. One of his recent ones is about what he's learned about Female founders

Read to discover:
Is YC anti-female (spoiler: no)
Do female founders fare differently in startup culture (spoiler: sometimes, but that should rapidly improve)
What can we do to encourage more females to be founders?

Thursday, 10 April 2014

Heartbleed: openSSL has been compromised test your site!

So, you may have read that there's a security vulnerability in OpenSSL called Heartbleed. It's pretty serious and potentially affects everyone. You should change all your passwords right now.

Read more about it here: Here's How To Protect Yourself From The Massive Security Flaw That's Taken Over The Internet

You can use this site to test any site you care to try: Heartbleed test

Friday, 4 April 2014

Quit being so negative!

Interacting with other people is all about perceptions. For better or worse, we can't see inside of other peoples' heads and have to infer what's inside of them based on their actions... and also on (get this) *our* past behaviour.

You thought it would be *their* past behaviour, yes? but actually unless you've known somebody a really long time - your perceptions of another person are more based on what you have done in the past, than on what they have.

It's way too easy to totally miss this point when it comes up in reality - because what you think another person is doing... just seems so obvious. Surely they're doing X, it's just obvious they are...

What you don't see are all the subconscious micro-decisions that got you to that point. What exactly did you base your observation on?

Could you be mis-interpreting something? Just because you (or your sister, your boyfriend or your old teacher back in high school) used to do X and that meant they thought Y - doesn't mean that this person you're talking to right now... thinks Y - even if they're quite clearly doing X.

This all stems from a bit of an example from my own life (I'm T):

P comes up to T and tells her all about a friend of his who's developing a new javascript library.
"it's gonna be awesome!" P enthuses.
"interesting," T says. "so what does it offer over jquery?"
"what do you mean?", P asks, looking taken aback.
"well, jquery is pretty bog-standard in the web-world right now. What does your friend's library do, that would make me choose to use it over jQuery?" T replies.
"why are you asking me that? It's a great library, it's going to be the best!", P asks

We'll stop here and see where everybody stands, because I know from later discussion that P is thinking that I'm not interested in hearing about this new project. He thinks that *I* think it's only worth doing a project if it's better than jQuery. Why else would I demand what this new project had to offer and whether or not it was worth pursuing? How dismissive of me!

Hang on a tick... what did I *actually* say?

None of the above, it turns out. From my perspective, I was curious about the project and wondering what it might have to offer.

It think it all hinges on what part we both assume the role of questions plays.

I assume that questions are to elicit information on something of interest.
P assumed that questions were a way of poking holes in an idea and dismissing it.

Both of these are assumptions based on our own past history of using questions.

Perhaps when P questions something it's because he has strong reservations about it, or because he's decided it's a bad idea and he wants to highlight all the flaws in it... but assuming that that's the reason why *another* person asks questions... will lead to very great misunderstandings.

No doubt there are downsides to my own assumption - obviously that other people will get the wrong idea about my reasons for doing so... perhaps thinking that I'm attacking their idea instead of finding out more about it.

The biggest part of the problem is that that these assumptions are pretty-much invisible to us. To us it just feels like "the way it is"... not "my perspective". it's only when we brush up against somebody else's different perspective that we even notice they're there at all (like two people with different-coloured sun-glasses finally swapping notes about the colour of objects they see).

I haven't got a solution to this problem yet... I'd be curious if any of you readers out there do. feel free to comment and let me know.

Saturday, 29 March 2014

Speaking Eloquent Javascript - learn javascript (and programming) for free

Eloquent javascript seems a nice site for learning programming for free, by working your way through a free textbook.

I've only skimmed it myself - I've been working my way through Code School's Javascript path.

Another that's just come out is Speaking javascript (an O'Reilly book that's also online for free)

I've heard good things about both of these.

Have you tried either one? If so, tell me what you think, or if you have a better (free) source, let me know in the comments.

Sunday, 23 March 2014

Link: Australia's top female programmers

Pollenizer has posted a list of what they call Australia's top female programmers.

I apparently made the grade... but it's a little scary to see my name amongst some of the most awesome women coders I've met over the years...

Tuesday, 11 March 2014

The failure of the ruby community - and what we can do about it

Sam Peters holds up a dark mirror in which our community reflects more poorly than I'd have hoped to see.

Her post on ruby meetups and the developer community is particularly worth a read for those of us happily ensconced inside that echo chamber.

Some representative quotes:

"[at ruby meetups] people who knew one another would connect, catch up, and spend the time excitedly discussing the latest news. To one another. Exclusively."
"Upon my attendance [at ROROSyd] I was immediately struck by the small, tight groups of people scattered across the venue – something that felt quite intimidating as a new learner"
"My more unorthodox theory implies that this community is merely an illusion"

The words "scathing indictment" spring to mind.

Clearly this is not the kind of community that we want.

As a mob, we can be pretty intimidating - and we need to work on better outreach and inclusiveness at our meetups.

I remember the earliest days of the rails community in Sydney. I remember when everybody was a beginner, and we came together to share our solutions to the hard problems we faced, to welcome newbies and help each other grow into skilled rubyists.

One particular observation of hers at rubyconf gives an example of what we can do better:

" I also experienced a bit of community on a personal level too – one particular lunch time, a pair of developers invited me to their table with no pretence or expectation. It resulted in a rather pleasant lunch, and opened my eyes a little. I felt a little more welcome."

In other words - it doesn't take much.

If there are people at your local meetup looking new and alone, go over and say hi. Ask them about their experience in ruby, invite them to sit at your table. Just start the conversation and include them.

I'm personally hoping to help break down that barrier-to-entry with Ruby Women - to provide at lest one extra avenue into the scene via a smaller, more beginner-friendly meetup and more open network of friend

The full article is well worth a read and some careful self-reflection. We should take note and work hard to build something better.

My Students

So, I've been teaching the General Assembly Immersive Web Development course for the past two months now.

It's going great and has been a really rewarding (if highly challenging) experience for me

They've recently finished their second (of three) projects, and the results are pretty amazing - especially considering that most of them had never touched a line of code, two months ago.

Here are links for some of their blogs to see how they've been coping over the past two months...

Sam Peters

Sam is a creative developer and her humour punctuates her work. Her blog showcases her particular mix of creativity and humour, with quite pointed insight into the development process and community

Her first project was: Forage, a website built to let gardeners swap their excess produce with others.

Alberto Forni

Alberto moved here all the way from Italy with his girlfriend in order to learn development. He's studying full-stack development, and his girlfriend is in the classroom next door studying User Interface Design. So I expect them to make a formidable development team when they're done.

His first project was: Alfred lets you keep track of expenses and wishlists - and share your wishlists with your friends.

Luke Schoen

Luke is always overflowing with ideas. No sooner do I describe some new topic and he thinks of five new applications for it in various combinations with other things he's learned.

His first project was TrendMyHunch, a site to share your ideas, pick your favourites and see if they're currently trending on google.

I have plenty more students, but they haven't shared their blog-urls with me yet... I'll come back and add them if/when they do :)

Here are the links to their recent, group-projects:

Expense Tracker

Split and track expenses with your friends or housemates

Autism Connect

A community for carers of the Autistic, allowing sharing of autism-related events, documents, links etc

Rick Rampage

A javascript, scrolling shooter game (the scores are stored in the rails backend)

Saturday, 8 March 2014

Classic: Making Wrong Code Look Wrong by Joel Spolsky

The article Making Wrong Code Look Wrong by Joel Spolsky is a classic take on a programming concept that you should still, always keep in mind when writing your code:

You should try to write your code so that it's more difficult for things to go wrong...or at least more obvious when things do.

It was written Some Time Ago - so take his prescriptions with a pinch of salt and apply your intelligence and ingenuity.

It's the vibe of the thing that matters here :)

Sunday, 2 March 2014

Ruby Women - a new meetup group

TL;DR: come to the Ruby women Sydney meetup (if you're a woman in Sydney and into ruby and/or rails), and please spread the word


I've been kicking around this idea for a while now.

You see, once upon a time I was a regular at the Sydney Linux Users Group - a formidable group of uberhackers. I knew almost nobody there, and due to the high skill-level of the members found it overwhelmingly scary to even think about presenting.

I was simultaneously looking into issues that women face in the workplace, and came across a couple of different books that pointed out that women, in general, tend to be more self-critical and less self-confident than their male counterparts.

It helps to have a network of other women to support you... but where can you get one in the traditionally male-dominated arena of IT uber-geekery?

Well - shortly thereafter, a number of us women in linux geekery began organising a local version of Linux chix. We just got together about half an hour before the SLUG meetup - and chatted and gave mini talks on interesting and basic linuxy topics... (nothing special)... and then all walked en masse to the SLUG meetup.

It doesn't seem like much, but it made a huge difference.

It provided a safe, conducive environment to women-geeks to introduce them to the linux community, without diving right into the deep end. It also provided a network of other women to serve as colleagues and role-models.

A couple of short years later, Sydney hosted a Linuxconf(.au) that had a remarkably large percentage of women for conferences of the kind - along with a whole mini-conf on topics relating to women in IT.

Linux-geekery was now something that women participated in too - in large (if not yet equal) numbers, and I'm quite certain that the strong networks formed at linuxchix helped with this

then I went away to the UK for three years...

Coming back to Sydney again, now part of the ruby community... I went to my first rubyconf.au and was overjoyed to hear of RailsGirls - a hackday-style initiative designed to help non-dev women get their first Rails site up and running.

...but it has come to the attention of many, that there's not much to keep interested women going after this. RailsGirls is currently working on RailsGirls-Next - to help Rails Girls participants continue working on their apps and slowly improve their skills... and alongside that - I've been working on something much more akin to the linuxchix concept:

Ruby women

It will be a group dedicated to women in the ruby/rails community - providing exactly the kind of supportive network and easy transition into the ruby/rails community that I think women still need.

Our first dinner meetup/discussion will be held on Wednesday 19th of March in Sydney

Please feel free to publicise the meetup far and wide, and to invite any and all women you may know.


To head off a couple of obvious responses:

What about a ruby men group?

Feel free to start one. There's nobody stopping you, and I'd certainly welcome that too.

I'd be really interested in hearing about the issues facing men in the IT industry too. I've heard especially about issues regarding fatherhood and balancing concerns of needing to appear dedicated to your job, as well spending time with your children... and also tales of unfair paternity laws (ie women are more likely to get time off for children than men are).

Can men come too?

Good question. We probably won't drive you away with pitchforks...

Personally, I'd be curious why you wanted to come. If you're there to pick up chicks - I'd be strongly against you coming. If you're there to support the needs of women in another group you run I'd happily welcome you...

but this won't be just *my* group, so others may have differing ideas about that.

Isn't it kind of exclusionary?

Yes. So is a group catering only to the interests of ruby programmers (as opposed to, say, python programmers)

Meetup is being DDOSed

I just checked meetup.com - it appears to be under a DDOS attack right now.

Check the meetup blog for ongoing details

Friday, 28 February 2014

Startups for the unexotic underclass

If you're an entrepreneur looking for ideas, consider looking beyond the city-centric, navel-gazing, youth-obsessed mainstream.

The unexotic underclass in a fascinating read for startups looking for meaningful ideas for new apps.

It's a call to action for us to stop wasting our time developing the next fashion-hunting twitter-app for our manicured dogs...
and instead start looking at solving some real problems that affect real people that we tend to mostly overlook, because they're just not treated as *interesting* enough by our society.

Really worth a read

Friday, 21 February 2014

Vale David E.

There's too much death going around right now.

The ruby world has been rocked by the death of of Jim Weirich (kind man, great teacher and original writer of rake)...

But for me, I have to say this is overshadowed by two deaths much closer to home.

About 3 weeks ago, my grandfather died.

I was never really close to him, but his passing sent ripples through my family. Even my close family came back from the states to attend the funeral and be with my grandmother.

But my grandfather had made it to 96. He was well-travelled and had managed to complete his book on lay evangelism - which was the end result of his life's work in his church. He lived a long, full life.

This morning, my uncle gave up his struggle with cancer.

He was only 70, and the world is that much less bright without him in it.

He was kind and generous, and always made me laugh. He brought joy and love back to my aunt - whom he married only a few short months ago (right after the diagnosis).

He was way too young to die.