Tag Archive: c

Hacker School: Week 7

I’m in the second half of Hacker School, feeling short of time and not sure what to do about it. My only option is to keep showing up every day and getting things done. I sit at a long table in a huge room or abscond to my personal favorite work space, a living-room-like corner with a high ceiling, a metric ton of computer books, and a metal staircase leading up to a door that doesn’t open.

On a beanbag or couch in this corner, surrounded by books and people hacking on projects and a robot mural painted on the wall, I feel equally at home and unsettled.

After focusing on C for two weeks and then an Xcode plugin for a month, I’m switching my “learning” focus to JavaScript and node.js. I’m using the excellent Learn JavaScript Properly outline suggested by Richard of Stanley, and so far it’s going well.

Turns out I like JavaScript. A lot.

This is sort of a surprise to me, because I’ve heard JavaScript is weird. Inconsistent. Unreliable, even.

But I resonate with the C-based parts of the syntax, and it’s helping me understand the function-based parts that aren’t quite the same as Objective-C’s classes and methods. I’m learning from a solid base. And that’s reassuring.

I also feel like I can eventually build almost anything with JavaScript, and that’s motivating. I don’t feel like I’ll need to learn it for six months before I can do anything useful.

My “building/maintenance” focus remains on expanding and extending the plugin, so I have two tracks to switch between. This is my best mode of working, because even procrastination can become productive — if I get tired or burned-out on one thing, I can switch to the other. It also ensures I write code consistently and don’t get bogged down in only book-learning.

I’ll write a full-on technical post about the plugin soon.


Hulk, Smash! C for Fun

I struggled with Learn C the Hard Way. I wasn’t engaging with the exercises. I typed and typed and tried to motivate myself, but C’s function-based flat-file-ness and inscrutable function names stymied me.

This was the language I’d failed to learn twice before.

This morning I spoke with Jessica McKellar, a resident at Hacker School, and she turned this whole thing around.

She suggested ditching Learn C the Hard Way and instead learning C a different way, by diving into a book called Hacking: The Art of Exploitation. This made sense to me for two reasons:

1. Although I have no significant background in C, I studied information security in grad school and have broad context around network security.

2. It sounded much more fun.

After speaking with Jessica, I sailed through 100 pages of Hacking: The Art of Exploitation, typing code when I felt it would be useful and reading the book when I felt that would be useful and even, as a bonus, learning a little bit about how assembly language works.

I can’t wait to get back to it tomorrow. This experience reminded me that pivoting is not just for business ideas. If I’m learning something and not loving it, there is almost always a way to switch tracks without giving up.

This is some kind of basic life lesson that I have been forced to learn over and over. Keep adapting, and it’s almost impossible to fail. Fail to adapt, and failure becomes almost inevitable.

The Explorer’s Dilemma

Exploration is much harder and much easier than it once was.

Physical exploration is much harder. Humans have swarmed across the planet, marking territory, discovering caves, streams, mountains and seas. Aside from the deep seas and the magma lakes below Earth’s crust, little remains to be discovered. I’m immensely fascinated by northern Canada, which remains sparsely populated, especially in places like Baffin Island.

Intellectual exploration and innovation are exponentially easier. The Internet has made huge quantities of information available to nearly everyone at fast speeds. And it’s easier to find people to work with on projects and problems, because they can be next door or on the other side of the planet.

I’m engaged in this type of exploration at Hacker School. I spend all day in a room alongside other skilled people with various backgrounds and interests, and we try to learn a lot rapidly and solve interesting problems.

Today I made good progress: I brainstormed approaches to a speech accessibility project; worked on Learn C the Hard Way, including a pair programming session on C switch statements; and attended sessions by resident Mel Chua on learning styles. Learning styles aren’t destiny: They reflect personal preferences and natural tendencies, but it’s possible to become comfortable in a non-innate style.

My personal learning style is somewhat reflective, extremely intuitive, evenly visual and verbal, and somewhat sequential. I’m constantly seeking connections between different ideas, then piecing them together in a logical way toward a goal.

What’s great is that thought patterns and ideas are not a finite resource. They’re endless, endlessly renewable, and endlessly interesting.

Day 46: I Wrote This on My iPhone and It Was OK

I started writing this post on a smartphone at lunch and finished it in my hotel room. I’m not used to typing on a smartphone, but I got tired of losing the thoughts that slip through my head while walking, eating, and people-watching.

I wonder why each person is here, in Quebec City, as they walk past — who he is, if she is on vacation or on sabbatical, if they work here or study at a university or travel, with one foot in this city and one in the next place.

I love this city. I haven’t been super-productive, choosing instead to enjoy the Summer Music Festival and my family’s company for the few days they also were here. Today was different — I read for five hours and then stepped out for lunch. Later, I’ll read and write for five more.

Low-Level Hardware-Software Interaction

I’m learning about low-level hardware-software interaction — the stuff that happens when mouse clicks and typing are translated into machine instructions that whiz between the central processing unit (CPU) and the memory and back. My vehicle for learning these things is a great Coursera course, The Hardware-Software Interface by University of Washington professors Gaetano Borriello and Luis Ceze, complemented by Zed Shaw’s Learn C the Hard Way and Bill Dudney’s All the C You Need to Know. Even though Objective-C is going away, I think it will still be a good idea to understand it and the C underlying it, so I can make maximum use of Swift alongside those tools (since I think they will coexist for a couple of years at least).

I learned Objective-C as my first programming language (and I love it, despite its to-be-deprecated status), so I’m in a bit of a weird spot. I think it’s a sweet spot: I understand enough about low-level programming to learn the guts and internals of machine language — so I’m taking that opportunity because I think it will make me a better programmer. I also understand enough about high-level programming that I’m able to comprehend Swift fairly well and expect to grasp JavaScript/node.js when I dive into it later this summer.

For now, I’m having lunch on a street in Quebec City, watching people pass by.

Goals and Productivity

On last week’s goals:

  1. I fixed the search functionality in my flashcard app. I also identified ways to improve it.
  2. I implemented swipe-up functionality. The card doesn’t disappear yet after the swipe, but I’m working on fixing that.
  3. I read part of the Swift book, but then got distracted by the Coursera Hardware-Software Interface course.

This week’s goals are:

  1. Fix the swipe-up functionality in my flashcard app so the card disappears after the swipe.
  2. Delve into low-level programming topics and struggle through what I don’t understand, including the C underlying Objective-C.
  3. Finish creating questions for my flashcard app database.