Paytonrules Ramblings
  • Posts

Posts

January 24, 2015

The Most Important Refactoring

My readership comes from a wide range of development backgrounds. There’s my fellow 8th Lighters who went through apprenticeships drilling TDD into their head and then spent years of their careers making projects the “Agile” way. There’s experienced developers who want to apply TDD effectively in their organization, which may be hostile to the practice. There’s brand new programmers who don’t know a thing about anything, but they know it, and of course there’s my Mom.
January 13, 2015

The Path to Learning TDD

It’s a common refrain. You’ve heard about TDD and about it and you want to learn, but when you try to apply it to an actual project you can’t see how to do it. For example see this question on reddit or heck the premise of my old website. Fortunately it’s not that hard to learn TDD, to the point where you’ll no longer be worried about getting “good at TDD” but will move in to “good at software” in a few weeks.
December 22, 2014

Write Your Own Generics in Go

Go, the systems programming language from google, doesn’t have generics. That means in order to collect over a list instead of doing this like in C#: list.Select(i => i + 2); You “have” to do to this: numbers := []int{1, 2, 3} newSlice := make([]int, 0, 3) for _, num := range numbers { newSlice = append(newSlice, num+2) } This causes no small amount of consternation in the Go community and even more in the Go sucks community.
December 15, 2014

JavaScript This - A Simple Test

Ahhh JavaScript, everybody’s favorite language to hate. You have == and ===, but not classes. Your module system is non-existent. It’s a functional language, but everything is mutable. Don’t get me started on the way it does type coercion. But maybe the most confusing part is: THIS In every other language in the history of earth this or self has a pretty clearly defined meaning, the class you’re executing in. JavaScript has no classes, which can lead to some surprising results.
November 22, 2014

How Many Lines Should be in a Class?

If there’s one thing I know, it’s that developers love to argue. It can be the important things like naming and design all the way down to silly things like where a curly braces should go1. One thing we all can agree on is that software is easier when it’s broken down into small chunks. We just don’t agree on what small is. How many lines should a class be? This Clean Code cheat sheet says classes should be less than 100 lines, but it doesn’t specify language or platform.
October 10, 2014

3 Simple Ways to Test Legacy Code

We’ve all been there. Maybe you’ve read a TDD tutorial, taken a TDD course or attended a Code Retreat and have become “test-infected.” You write tests first now. On Monday you’re even excited, until you sit down to deal with the beast. Fifteen thousand lines of code in one function, and you have to write a test for line 11,398. The mere thought of writing tests is depressing, defeating. You resign yourself to being a glorified factory worker, add one more if statement, and die a little inside.
October 7, 2014

Simple Test? Just Write It!

When writing in a Test Driven style, especially when you’re a newbie, it’s very common to write tests that look very much like the production code. I saw this question asked recently on Jeff Langr’s google group for his new book: I have two structures, and I need to write function to convert OldUgly into NewFancy, e.g.: Do I need to write incrementally 3 test (for each field) or can I write simply one test?
October 3, 2014

Are Output Arguments Bad?

In Clean Code Bob Martin disparages output arguments, saying “In general output arguments should be avoided.” But are they always bad? This was the question posed at the Clean Coders google group that prompted this post. Words like “always” apply universal laws which are almost never found in software development, so the simple answer to that question is no, output arguments are not always bad. That said I can’t think of a place where I prefer them, and only use them where I have to because Frameworks or tools don’t allow them.
March 23, 2014

iOS does not support unit testing

I’ll say it again: iOS does not support unit testing This is a pretty bold statement coming from me considering that I’ve devoted [much] (http://vimeo.com/5765266) of the last [few years] (http://blog.8thlight.com/eric-smith/2009/05/11/tdd-and-iphone-nstimer.html) to teaching people how to do TDD on that very platform, but it’s the truth. For years Apple used this definition for Unit Tests: You use logic unit tests to perform exhaustive, highly tailored testing of your code. With application unit tests you test your code within an app running in a simulator or on a device, with access to the resources available in the Cocoa framework in Mac apps, and the Cocoa Touch framework in iOS apps.
February 8, 2014

Marketing Some More

I’m starting to form a marketing plan. Unfortunately the attempts to finish the game side-by-side with moving on marketing mean I’m doing both half-assed, except I work on this part time so it’s really more like 1/8th assed. I don’t have much ass, is what I’m saying. What I have is the beginnings of a todo list. For starters I have created a signup page at Rush Industries. I’m using launchrock.
January 18, 2014

Scaling and Abstractions

Time to get a little blogging in. Today I want to talk about scaling and leaky abstractions a bit. Let’s take a look at one of my screenshot Saturday images: I’m moving the game to a new theme, to better fit with the existing graphics. As I did that I restored the graphics to their original PlanetCute .png files, which were smaller than the ones I had scaled in GIMP. You can see here nothing looks right - the buckets are now too far apart, the distances are huge, and if you see the stars in motion they are very very slow.
January 11, 2014

Marketing

I owe a screenshot, as it is Saturday, but I’m currently trying to get texture packer working so that may be a moment. Today I want to talk, briefly, about marketing. Specifically how I haven’t the foggiest idea how to do it. I think it involves drinking martinis at lunch. Last week my goal was to design a marketing plan, and I didn’t accomplish it, and I had the same goal this week and that never had a chance due to the day job keeping me up late for a week now.
  • ««
  • «
  • 1
  • 2
  • 3
  • 4
  • »
  • »»
© Paytonrules Ramblings 2022