Free Programming Books

Books

Last month I came across a GitHub project which is primarily a list of free programming books.

Originally a clone of a StackOverflow listing, it has been updated with dead links removed and is now collaborative. If you know if any freely available programming books out there, you can submit your own updates.

It comes in multiple non-programming languages, too. B-)

There are books organized by language, such as C++, Ada, JavaScript, and TeX. Other books are language-agnostic, so you can find tomes on algorithms, cellular automata, mathematics, programming paradigms, and regular expressions, among others.

Besides the language-specific and math books, there are books on networking, licensing, open source culture, operating systems, and security.

Some books are about professional development. Others are about architecture.

But it’s amazing how many books there happen to be out there, freely available.

The downside? There are two I can think of.

One, many of these resources are somewhat older. To be fair, not all of them are. Still, enough of them are that you sometimes feel like you’re reading a history of computing, which may not be a bad thing if you’re curious about how things have evolved to today’s state of the art.

Two, most of these freely available books require you to be connected to the Internet to peruse. I wish more were available in PDF or epub format, but most are much like Eric S. Raymond’s The Cathedral and the Bazaar: there are a series of web pages to read, but there is no ebook there.

Now, I purchased the hardcopy version of Cathedral back when it was first released, but that’s besides the point. Many other resources linked to from this book list don’t have an ebook version.

Some of the links to free books are to PDFs and are labeled as such.

Others do have either bound books forms or ebook formats, but if you want it, you need to pay. It’s basically shareware applied to books. You get to to try out the free version, and if you like it enough, you can pay for the full version to read on your tablet at your leisure. And some of these links show more aggressive marketing than others, so there’s something else to learn there if you pay attention. B-)

What’s your favorite free book from this list?

The First 20 Hours of Learning

Early in the life of this blog, I wrote about practice and talent. In it, I mention the now very commonly known idea that it takes 10,000 hours of deliberate practice to become an expert in something.

In the years since, I was part of the Thousander Club, which was started by Scott Hsu-Storaker after he read that post. The idea was to practice some skill for 1,000 hours in a year, which meant practicing roughly 3 hours a day. With a day job and a vague skill, I fell woefully short over the years, but it was a good experience to track just how much time I was spending on something that I thought was important enough to learn.

Still, 3 hours a day is a lot of time for people, especially people who are new parents or otherwise have a lot of demands. It’s easy to feel spread thin.

Plus, you don’t necessarily want to be an expert in something. You might just want to learn enough to have fun. Playing guitar, skillfully playing StarCraft, and drawing realistic portraits? You can learn any of these things enough to enjoy it, and maybe that’s enough. You aren’t necessarily interested in joining a band as lead guitarist. You may just want to be able to play love songs to your significant other without them sounding terrible.

Josh Kaufman, who wrote The Personal MBA, also wrote The First 20 Hours: How to Learn Anything…Fast!.

In this Tedx talk from last year, Kaufman says his research tells us that to learn something, it takes 20 hours to get past the fear of feeling incompetent.

Merely doing something for 20 hours isn’t enough. It’s like the idea that practice doesn’t make perfect. Perfect practice makes perfect. You have to do it in a deliberate way to learn in an accelerated manner.

There is a method. He says that there are four steps:

  1. Deconstruct the skill. What do you actually want? Practice those first.
  2. Learn enough to self-correct. Don’t procrastinate by reading books or websites. Get to the point where you can practice.
  3. Remove barriers and distractions to practice.
  4. Practice at least 20 hours.

Last month, I dedicated myself to learning Android app development, and to start, I thought I’d pull up the Android Developer resource, but it was quickly clear to me that the docs were not updated along with the tools. It was like the instructions said, “To learn how to drive a car, first put your key in the ignition, then…draft behind the pole position before overtaking” with no mention of the basics of how to accelerate or brake. I don’t know if there was an expectation that I knew how to load specific resources in Eclipse considering I just learned that loading resources was a thing, but that’s how it felt. The Getting Started pages seem to have gaps if you treat them as a tutorial.

So I found Programming Mobile Applications for Android Handheld Systems on Coursera. Rather than take the actual course, I watched the videos. Partway through, I knew enough about what Android apps could do to be dangerous, but I watched all the way through the videos before allowing myself to do much development myself.

While I am glad the course is offered and that I could get this insight, I could have started practicing earlier. You don’t learn from watching videos. You learn from doing. By not taking action, and deluding myself that I was still learning, I was merely procrastinating.

It’s daunting to start something new. I already know how to make games for GNU/Linux, and yet Android seemed to be a different beast altogether. How long was I going to have to go through the steps of learning everything I needed to learn before I was capable of delivering games to Android users?

The good news is that I am not starting from scratch. I already know how to do so software development fairly well (hey, Self from 2006! You did good in practicing all these years!). Also, Android development is less about learning how to program and more about understanding what capabilities are available and what deployment procedures there are.

But once I started applying what I supposedly learned, then I was really learning. And once you get past that initial frustration with how ignorant you are, once you get a little confidence in your abilities, you can start enjoying the process.

October #1GAM Entry: Candypreneur

October’s One Game a Month entry is Candypreneur, a candy tycoon game inspired by the classic Apple II game Lemonade Stand.

Download Candypreneur for Linux 64-bit (432 kb tar.gz file)

I wish I had dedicated more time to this project. I had surgery and wasn’t able to work on it while I recuperated, and when I was able to spend time on it, I squandered it.

Still, I learned some things, such as that a best practice for representing money in software is by using integer values to represent cents rather than using doubles to represent dollars.

October #1GAM

October #1GAM

I wish I had time to theme it up a bit more. Some candy icons would have helped.

Also, the economics model is too simple. I managed to add random events that can impact the number of prospective customers, which you can sometimes prepare for if you check the reports screen for the upcoming month.

For this project, I had a much more complex simulation in mind. I wanted competitors, suppliers, customer moods, storefronts, candy ingredients, and research & development.

Even when I scaled down, I still didn’t put in things such as the rising cost of advertising or the ability to take out and pay back bank loans.

I’d say this is probably the project I’m least happiest with. I feel like there isn’t enough there, although some last minute additions make it less certain you’ll sell that candy.

What Do Early Risers Do Better?

Magical Clock

Early to bed and early to rise makes an indie healthy, wealthy, and wise.

While many programmers and game developers might be happy working late at night, some choose to wake up early to get the same benefits: no one else is around to distract you from your work.

Getting more done by 8AM than most people do by noon is just one of the perks of getting up early, but what other habits do early risers get to take advantage of?

From 5 Things Super Successful People Do Before 8 AM:

  1. Exercise.
  2. Plan the day.
  3. Eat a good breakfast.
  4. Visualize success.
  5. Get the most important and difficult stuff done first.

While you might think that you can just time-shift everything in the list, there are incredible benefits to doing them first thing in the morning.

For instance, you probably don’t want to exercise before going to bed at night, as your body is now full of energy. Wake yourself up with exercise instead. On top of that, high quality exercise is something that gives you benefits throughout the day. It’s like having a bonus multiplier on your metabolism.

What do you do first thing in the morning that contributes to your success as an indie?

September #1GAM Entry: Hextrap

September’s One Game a Month entry is a clone of the NES game Yoshi.

Download Hextrap for Linux 64-bit (410 kb tar.gz file)

I’ve never made a falling block puzzle game before. I had more ambitious plans, but with ISVCon 2013 taking up a lot of my time, I ended up doing most of my game development hours on the four planes I rode to and from Reno, Nevada.

I started out with creating the four stack platforms, and a swapper which the player controls.

September #1GAM

I created shapes to act as the various pieces: circles, triangles, squares, and pentagons. Hexagons were special. If a top hexagon piece is over a bottom hexagon piece, the pieces in the middle were consumed and the player got bonus points.

September #1GAM

I think what put this project in jeopardy was that I wanted some particle effects. It didn’t take long to implement, but I could have spent my precious time on the game play.

September #1GAM

But it came together quite well, even if I think it feels kind of hacked together at times.

I think the only thing missing is an issue involving the interaction of a swapping stack that is higher than a falling piece. Right now, the falling piece stacks on top, whereas it should flip around to a different stack.

Oh, and sound effects and music would be nice.

The scoring is also much simpler than in the original game.

Enjoy!

Shipping Beats Perfection

Ben Kamens is the lead dev of Khan Academy, the incredible free resource for education, recently explained “shipping beats perfection”, one of the organization’s development principles. It’s good reading, plus has pictures of a smiling dog, so you should go read it.

From their principles page:

Scope features down to their core before getting started. Iterate outside of the code. Use mockups, design discussions, and anything else that helps you cut out the nonessential before diving into the 1s and 0s.

Sounds like Agile software development to me. You don’t code immediately after being told what features are needed. You find out what actually provides value. You learn how the feature will be used, which will inform the algorithms and design. You find out what isn’t needed. You’re more likely to deliver the right feature.

But Ben found more explanation is needed. Too many people hear “shipping beats perfection” and think “we ship poor quality.”

He boils it down to three phrases:


We’re willing to be embarrassed about what we haven’t done…

If there’s something missing, that’s temporary. Well, frankly, everything is temporary, but if something is missing, it can be rectified by creating it.

And creating it should only be a decision made if it turns out that there is a demand for it. Energy and effort aren’t expended on guesses at what provides value.

You could try to build everything at once, but more and more, people are realizing that it isn’t necessary. The Lean Startup by Eric Ries is the latest hotness that argues for building a minimum viable product. When you have something out in public, you can learn what the public wants, change your approach to meet the need, and constantly learn and improve.

In a way, you’re throwing spaghetti at the wall. You have something you’re making, but you don’t know how it should feel or look until you get some feedback.


…but not willing to be embarrassed about what we have done.

Whatever is shipped is high quality. It’s not counterintuitive at all. Quality is about what the customer receives. If you don’t build quality in from the beginning, you’re building your product on quicksand, and future work becomes a slog through past poor decisions.


Leave it better

It’s the idea that you never leave an area of code without doing something to improve it.

I’ve written in the past about how you’re responsible for your code. The quality of your code is a result of past decisions. Sometimes hacks are needed to get value out earlier, but eventually you have to pay down the tech debt if you don’t want it to slow you down later.

But how do you know when you’re over-engineering versus purposefully writing tech debt versus hacking?

What’s key is who is being served by your efforts.

If you are embarrassed by code you wrote, you hacked. You and your fellow developers weren’t served by it when you have to return to it later.

If you are embarrassed by what code you needed to change to, then it’s probably tech debt you haven’t gotten to yet.

If you seek out perfection in engineering, however, you have lost sight of the customer.

That last one describes my efforts in creating Stop That Hero!.

A couple of years ago, I wrote about the importance of speed. Getting games to market more quickly, getting feedback from players more quickly, finding the fun as quickly as possible were all things I was failing at. I wrote about how my development was much slower than I would have liked, and I got a lot of advice from commenters.

What a lot of it boiled down to was that my goals weren’t clear. If I was aiming to learn how to write code and how to build things from scratch, I was doing really well. I was practicing test-driven development. I was learning about artificial intelligence. I was even learning how to use the Gimp to create decent programmer art. I was building up discipline, skill, and knowledge.

If, however, I wanted to make an entertaining game for paying customers in order to make a living, I wasn’t doing a good job of focusing on value delivery. The biggest problem was that I didn’t know exactly who my customers would be.

So who determines what quality work really is?

As Michael Gerber explains in One Game a Month site. Are they perfect games? No. Are they commercially competitive? Hardly. But I am proud of what I was able to get out there, and it’s gratifying to hear feedback from actual players.

Khan Academy has internalized this idea of finishing and delivering value as a key principle: “shipping beats perfection”. I need to remember to internalize it myself.

July #1GAM: A Hundred Thousand Bottles Washed Up On the Shore

First, a reminder about my Stop That Hero! Birthday Sale that’s running all this week.

Get 40% off of my strategy game that puts you in the role of the villain by using coupon code BIRTHDAY2013 at http://www.StopThatHero.com to help me celebrate my birthday tomorrow!

Next, you can finally eat something in Shipwrecked, my July One Game a Month project.

While the game has let you starve to death slowly for some time, there’s been no way to avoid it until now.

I had a vision for an entire inventory system to manage, but in the interests of finishing this project, I’ve decided that pressing Tab is enough to cycle through any items you are carrying.

If you have an edible object in your inventory, and it is the currently equipped item, you can now use the Eat action.

July #1GAM

I also added a few more items to the game, such as bottles:

July #1GAM

My plan is allow you to fill bottles with liquids, but you shouldn’t fill it with sea water, which will actually dehydrate you. Which means I’ll need to make some fresh water somehow.

Which brings me to the problem I’ve been having with the creation of this game.

I have less than a week to get this project done by the end of the month, but there is still nothing really interesting to do yet in the game. I think if I learned anything from this project so far, it’s that you shouldn’t try to address an entire game’s features at once.

For example, when I added hunger to the game, I should have followed through with creating food, and then creating the ability to eat that food. Instead, I had various aspects of the game in various states of completion.

I have a lot of ideas and plans for this project, and I might be falling in love with it, which makes it hard to let go.

I’ll have to finish a minimal version of Shipwrecked for now so that I can come back to it another day.

No, no, Shipwrecked. Don’t speak. This thing is bigger than either of us.

Happy Independence Day!

Independence. It’s fantastic.

And it’s still only a dream for some people.

Imagine lying on your death bed.

Would you be happy you haven’t fired on all cylinders and instead played a conservative game?

Or would you be happy if you could say that you gave it your all and didn’t let fear stop you?

If you are not yet indie, set a goal, make a plan, and go achieve it.

Keeping Your Goals In Front Of You

It’s June, but I want to talk about New Year’s Day. Specifically, I want to focus on goals, such as New Year’s resolutions.

New Years Resolutions In June?

Some people hate the idea of resolutions, but resolutions are just goals, and who hates goals? You can make them any time of the year. The end of one year and the beginning of the next is simply a good point in time to look back on your recent accomplishments and failures, look forward to possibilities, and set some goals for the next year.

What people really hate about resolutions is that they are not really goals. They tend to be more like wishes. “I’d like to lose 50 lbs in 2013″ is a wish. So is “I’d like to travel more.” These aren’t goals, but most people don’t realize it because most people suck at setting and achieving goals. The problem is that goals become forgotten if you don’t keep them in front of you all the time.

I’ve been guilty of it myself. Horribly, horribly guilty of it. For years, I’ve blogged about how I wanted to dedicate more time to game development, and then I’ve blogged about kicking myself for not doing a better job. And then I would write a post about being resolute about improvement, only to find that I write about the same problems a year later. It was ridiculous. It’s also painful to go back and read those old posts, thinking to myself, “Self, how can you not see this cycle?”

You can come up with the most detailed and straightforward plan, a beautiful and inspiring list of goals, or a thorough checklist for your day, but if you stick them in a drawer and never look at them, they can quickly become forgotten. And if you don’t have any of those things, it’s even easier to forget what you supposedly decided you were going to do.

I realized that I needed to change something, but what?

How to Remember Your Goals

Like many people, I created a list of goals for 2013. These were things I wanted to accomplish before the end of the year. I used to try to make comprehensive lists of everything I want to ever do or accomplish, but I realized that shorter lists allow me to provide much more focus, as this 2010 post about achieving your goals more easily explains.

On my list are goals related to getting back into shape, creating one game a month, reading at least one marketing book a month, creating a passive income stream, and learning to play a song on my guitar.

Ok, so I have a list of goals. But I’ve had goal lists before. What did I do differently this year?

I put them someplace I knew I would always see them.

I could have printed them out and put them up on my wall across from my desk, but I was worried that I’d eventually forget about them. Instead, I put them at the top of a Google Docs document that I look at daily, my Workday Now lists. If you use GTD or Workday Now, you probably have a similar set of lists that you live and work from.

Goals For 2013

Everyday, I look at this document to see what’s urgent and important, and so I simply added a section at the top that shows my goals for 2013. As you can see, at least one of them follows the “make those goals vivid” advice, but not all of them do. Some are quite plain. But the important thing is that I see them each and every day.

Essentially, I remind myself of the goals I have constantly. Michael Linenberger calls it “spinning your goals” in Master Your Wokday Now!. Some people suggest writing out your goals every day or reading them from a pack of index cards twice a day or creating a vision board. It doesn’t really matter how you do it, so long as you keep yourself focused on your goals daily and keep yourself accountable. Whatever works.

Creating Habits, Checklists, and Plans

Of course, having goals and keeping them in front of you is not enough. It’s the doing, the accomplishment of those goals, that matters. Otherwise, you’re just constantly reminding yourself that your current life isn’t as great as the life you’d like and hoping that something will change on its own.

But knowing you have to take action is different from taking action. You can’t sporadically exercise and eat a salad once in a while and hope to “feel energetic, sexy, and free”. You need to make it habit.

In January, I published a card game called Walls and Armies that I had been working on for a couple of months, as part of the One Game a Month challenge. I had a video game in mind to work on, but as the end of the month drew near, I realized I hadn’t been good about making time for its creation. Luckily, I had a card game that I could submit at the last minute, but it wasn’t my original goal.

It wasn’t a good start to my year. It was crunch at the day job, so I had less time than normal. I had a long list of various responsibilities, but I didn’t have a good idea of priorities yet nor how to give attention to multiple of these obligations at once.

That month I realized I needed a workable schedule if I wanted to get sufficient game development time in. In fact, I needed a workable schedule if I wanted to accomplish any of my 2013 goals.

I also realized that I needed more than a plan. I needed reminders that I had a plan to work on in the first place. I know that some days it’s possible to feel less motivated to work on something than on other days. I also know that if I allow myself to take a break by giving myself a much-needed day off, I’d lose momentum, and I needed something to help me get back once the break was over.

Since then, I had created a daily checklist on the whiteboard on the wall across from my desk, which I see everyday. I originally had six items on that daily checklist, and it is now down to three as I noticed what was working, not working, or not important.

For example, I used to practice on my new guitar at least 15 minutes a day because I had a goal of learning to play a song on it, but then I realized that I was dedicating more time to a hobby than I was to my business, so I stopped making guitar-playing a priority. Unfortunately, it means I haven’t played guitar in months, but as sad as it is, I have higher priority things to do taking my time, and I would be sadder if one of those took a backseat out of some obligation to learn a new instrument.

Besides, I accomplished my goal of learning to play a song on my guitar long before March. “I Saw Her Standing There” by The Beatles never sounded so good.

I also eventually created a weekly checklist. Each day has a focus, and I want to make sure that I accomplish the focus of that day. Two of those days are game development days. If I don’t get anything else accomplished, I should have time dedicated to game development on those days. One my writing days, it’s possible I don’t get game development done because I spent my precious time writing, and that’s fine.

Assessing How Well It Works

Ideally, I’d be focused on a single project at a time, so that all of my working time outside of the day job is dedicated to one task or project until it is finished.

Unfortunately, my multiple responsibilities means that some things can’t be “finished”, but I still want to make sure I dedicate time to them all. For instance, being President of the Association of Software Professionals isn’t a job that can be finished if I work a lot of hours all at once. If anything, it will finish me. B-)

I sometimes wish I could focus all of my energy on a single project for weeks or months, ignoring everything else. I might experiment with it to see how things go.

Still, having days dedicated to certain types of tasks has its benefits. If I work on game development to the exclusion of all else on Tuesdays and Wednesdays, I don’t need to feel stressed that something is falling through the cracks. Anything that needs attention will get attention on its own day. I also can’t get bored, as I never spend too long on any one type of task.

But I’ve been using my current system for a few months now. As of this writing, I’ve been able to finish four games in the last four months, including Electromagnetic Play, The New Worlds, Toytles Colors, and Hungry Frogs. I’ve read or listened to five marketing books and 23 books total so far this year. I learned how to play a song on my guitar.

I’ve also written multiple articles and newsletters for the ASP, written a few blog posts, and up until recently have done a great job of creating daily updates for the Stop That Hero! Facebook page.

I have yet to lose weight or make traction on creating a passive income stream. In both cases, I think I need a plan that can translate into daily habits. My daily checklist has “Do stretches” on it, and while it is good for maintenance, it’s not enough to help me get in shape. I need to do more, such as getting back into running.

Still, I think that 2013 has been a good year so far in terms of finally keeping myself accountable to my goals. On some goals, I’m on track. In others, I’m not. But unlike past years, even my lack of progress is something I am fully conscious and aware of on a daily basis. They aren’t forgotten, and I am continually reminded that I’m not spending time in these important areas of my life. It’s more about treating them with the priority I originally assigned them.

How are you doing with your New Year’s Resolutions or other long-term goals? How do you keep them in front of you, and how are you ensuring that you are making progress on them?

April #1GAM Entry: Toytles Colors

For my April project for One Game a Month, I liked the idea of making a game for my nieces to play to learn colors and shapes. I thought of having animals to click on, and initially it was frogs, but when I settled on turtles, it all clicked together.

Download Toytles Colors for Linux 64-bit (395 kb tar.gz file)

I figured such a game would need to have more pizazz than my typical projects have, so I wrote up an animation class quickly, and then I used the Gimp to create some animated legs for the turtles. It’s not too bad.

I wasn’t able to dedicate as much time to it as I would like to this project. I was going to have the player try to click on matching colors as well as shapes, but I ended up scrapping the shapes.

I was pleased with the cartoony turtles I threw together, although the scale left something to be desired.

April #1GAM

I added some color picking criteria and made sure the player could click on a turtle with the right color.

April #1GAM

The final game awards you a point for each turtle you click correctly, and even helpfully lets you know which color you’re looking for.

April #1GAM

I had plans for particle effects and audio to celebrate and inform you when you clicked on the wrong turtle (“That’s not blue! That’s red!”), but I’ll have to address those next time I pick this project up.