<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by André-Marthin Helberg on Medium]]></title>
        <description><![CDATA[Stories by André-Marthin Helberg on Medium]]></description>
        <link>https://medium.com/@A_Helberg?source=rss-fa978946aea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WRSBgdKtSEr8MZNW.</url>
            <title>Stories by André-Marthin Helberg on Medium</title>
            <link>https://medium.com/@A_Helberg?source=rss-fa978946aea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:01:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@A_Helberg/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Leveling up in Ruby while keeping all your hearts]]></title>
            <link>https://medium.com/coded-coffee/leveling-up-in-ruby-while-keeping-all-your-hearts-15535d2d1ff1?source=rss-fa978946aea------2</link>
            <guid isPermaLink="false">https://medium.com/p/15535d2d1ff1</guid>
            <category><![CDATA[rubyfuza]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[André-Marthin Helberg]]></dc:creator>
            <pubDate>Fri, 03 Feb 2017 12:32:27 GMT</pubDate>
            <atom:updated>2017-02-03T12:32:27.436Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a long form post of a talk I gave at <a href="http://www.rubyfuza.org/">RubyFuza</a> 2017.</p><p>So you want to learn to program? Well, you’re about to set of on a remarkable journey.</p><p>The reason I chose this topic, Level up in Ruby while keeping all your hearts, is partly because, if you have ever attended a conference, or a meetup related to software, you get to sit in awe of all the smart people around you. Silently wandering to yourself if you’ll ever get to that level.</p><p>And it’s always a burning question,</p><p>“How do I ‘level up’?”</p><p>“How do I progress?”</p><p>“How do I stay sharp and hone my skills and craft?”</p><p>And, I chose it partly, because I can still very fondly remember my attempts to enter this downright confusing place of trying to bend a computer to my will.<br> <br> In a way this is a memoir to myself, laying down the things I wish I knew starting out.</p><p>These are some of the lessons I had learned, the hard way; habits I picked up, as well as tips and tricks that have worked for me.</p><p>Hopefully you find something in here to help you along this path. If nothing else at least a bit of reminiscence of your experiences getting to where you are today.</p><p>A few years ago meetups and conferences were a rarity! There are a lot of different experiences, backgrounds and treasure troves of information at these types of events. This is a very good place to start.</p><p>But let’s start at the beginning, you want to learn to code. A thousand questions are burning. Which language should I use? What tools? Which books?</p><p>Put simply, what should I do!!?</p><p><strong>Picking a Language</strong></p><p>The first programming language I learned, or I should rather say tried to learn, was c++.</p><p>I wanted to make games.<br> <br> So stubborn as I am I set of on the internet, I read thousands of tutorials, bought a fair number of books spent days and sleepless nights trying to to figure it out, but luckily I had ample time to catch up on sleep in my maths class.</p><p>So which language should you learn? Like myself you are probably thinking,</p><p>“Sure, c++ is difficult. But I like a challenge, and if I get the difficult parts down first, the rest should be easy right?”<br> <br>You should know that when I made that decision I had no one to ask for help, or tell me that I’m being rather daft.</p><p>So the first thing I wish I had was someone I could ask questions. There’s nothing to accelerate your learning like being able to get help.</p><p>So I started with c++, being none the wiser. And that turned out to be a bad idea. I spent way more time trying to figure out pointers than I actually did learning to code, or solving problems with code. And as it turns out there’s more to it, than writing for loops.</p><p><strong>Principles</strong></p><p>Solving the problem at hand, in a good way, is a lot more important than the language you use, working software is better than perfect software after all.</p><p>I use to take a lot of offense with that statement, aren’t we supposed to do our best? Aren’t we supposed to make sure that the program runs perfectly always? I want to make it perfect, I want to obsess about the small details that ultimately no one would ever see.<br> <br>There is a certain appeal in that, and while those things are also important, the underlying principles much more so.</p><p>In one of his talks, Greg Young mentions that, there is a good enough when it comes to software. Making something perfect requires catering for a lot of edge cases. If your edge case happens 1 in 10 times and will require spending a few weeks to solve it. Let a human deal with it. Software Engineers are expensive and edge cases will always happen. We’re not in the business of putting people out of jobs.</p><p>If you get the principles right, writing maintainable and extendable code. Making it perfect as you go will not only be possible, it will be easy and fun, it is called *Soft*ware and not *Hard*ware for a reason. You are free to change it at anytime, and unlike most things in life you don’t need physical resources to change things.</p><p>By no means do I advocate just slapping everything together and hoping for the best, but this is a good workflow that has served me well. Write -&gt; Test -&gt; Refactor.<br> <br>You need to know that the first time you solve a problem, your solution will be far from perfect. Expecting to write a flawless program in your first go, is like talking to someone about playing a sport and expecting to walk away a pro.</p><p><strong>Actually picking a language</strong></p><p>To that end, don’t get bogged down with which language you choose, in the end you won’t be using it forever. Instead learn how to code and not how to write in your favorite language.</p><p>Ruby is an excellent beginner language in my opinion. Yes there are a lot of magic that happens, and a lot of people might feel that you need to start at the lowest level possible. Learn C, get a grip on how to write, linked lists, a garbage collector, optimize it, write circular doubly linked list.</p><p>Truth be told, while those concepts are important, they haven’t been useful in my day to day.</p><p>Right now there is more processing power in your pocket than in the computer I started out with. Technology has improved so far that in our day to day we don’t have to care about registers, byte sizes and all of that anymore.</p><p>Learning to program in this day and age following that approach is like learning to drive by being taught thermodynamics so you can truly grasp the responses of the engine, then moving over to fluid dynamics and frictional physics spending your days calculating the coefficient of how the pedal, brakes, tires and road, all interact, only then are you a true driver!</p><p>Seems silly doesn’t it?</p><p>Start simple and work your way up. Once you are comfortable with coding and actually doing things with all those if statements and for loops, the advanced concepts will be a lot easier to pick up.</p><p><strong>Tools or vim vs emacs</strong></p><p>Leave your elitism at the door. There I said it.</p><p>A huge problem in Software development and coding stems from everyone wanting to be superior to the person sitting next to them. You know who does that? Extremists, and that is the root of any totalitarian system. And we wonder why there is a lack of diversity in coding?</p><p>The tool you pick doesn’t really matter.<br>Pick something you like, and learn to use it well.</p><p><a href="https://atom.io/">Atom</a> is free and open source and does a more than decent job of it.</p><p><strong>Learn to learn</strong></p><p>Now that you have picked your language and picked your tools, what’s next?</p><p>You first need to learn how to learn, and more importantly you need to learn how /you/ learn.</p><p>Once you accept that you never can or will know everything, this learning can become really fun, and a reward in and of itself. Do I sound crazy yet?</p><p>That feeling of overwhelm you get when you look at something you don’t understand, is the same feeling you get when you want to talk to your boss about a raise, or going on a first date. It is the feeling of being out of your comfort zone.</p><p>This is not only a good place to learn, it is the only place to learn, so learn to accept this feeling as just that, and that you can push through it.</p><p>Make your learning fun, it is yours to do with as you will.</p><p>And you will always be learning, every few years the whole landscape is turned up side down, ancient ideas come back into fashion. And the flavor of the month is a real thing. But the fundamentals stay the same. And as Jeff Atwood says “how only lasts about five years, but why is forever.” — <a href="https://blog.codinghorror.com/learning-or-learning-how-to-learn/">https://blog.codinghorror.com/learning-or-learning-how-to-learn/</a></p><p><strong>Stay Humble</strong></p><blockquote><strong>“Someone will always tell you you’re doing it wrong</strong></blockquote><blockquote>Braces should go on the next line. Braces should go on the same line. Use tabs to indent. But tabs are evil. You should use stored procedures, but actually you shouldn’t use them. You should always comment your code. But good code doesn’t need comments.” — Cecily Carver</blockquote><p><a href="https://medium.freecodecamp.com/things-i-wish-someone-had-told-me-when-i-was-learning-how-to-code-565fc9dcb329#.ierl3g8io">https://medium.freecodecamp.com/things-i-wish-someone-had-told-me-when-i-was-learning-how-to-code-565fc9dcb329#.ierl3g8io</a></p><p>The key here is to have strong opinions loosely held. Only a Sith deals in absolutes. The world is changing and so should your opinions. If you knew everything now you did even a few months ago, what in the world have you been doing with your time?</p><p>Don’t take a differing opinion as an attack on your being. You might have been doing something a certain way for years, but there might be a better way. Listen, observe and absorb.</p><blockquote>“It is the mark of an educated mind to be able to entertain a thought without accepting it.” — Aristotle</blockquote><p><strong>Getting started</strong></p><p>Now that you have all the tools and the right mindset, the next step is to learn.<br> <br> I would encourage you to learn as a first step, the basics of a VCS, such as <a href="https://git-scm.com/">git</a>. Having a versioning system in place makes the whole learning process so much more fun, and we’ll see why in a minute.</p><p><strong>Break things</strong></p><p>The key to being able to fix something is knowing how to break it. And if you are working on something that you don’t know, you’ll inevitably break something.</p><p>Say you’ve been working on a problem, you’ve refactored some of your code, changing the structure, and how a few things fit together, and now, all of a sudden nothing works, you debug and debug, but you can’t figure it out for the live of you!</p><p>“I don’t want to start everything from scratch, but I can’t solve this problem” Usually we as humans tend to give up at this point. But if you have been using git, you can simply reset your code to where you know it was working. And viola, you only lost an hour or two at most.</p><p><strong>Get some resources</strong></p><p>Figure out what you want to make, is it a website, do you want to make an LED blink, do you want to make a game, a mobile app. Keep this goal in mind when you pick what to invest your time in. For most languages there are bindings to do all these things.</p><p>Find yourself a book or tutorial on the language you pick. A quick google search will give you good recommendations on books. Read the reviews on amazon and good reads. That will give you enough information on wether it is worth your time and money to invest in it. Don’t worry about the framework for now. Once you get a grip on the language then you can move on.</p><p>If you decide to go with ruby here are a few resources that might help you:</p><p>Mobile Apps:</p><ul><li><a href="http://www.rubymotion.com/">http://www.rubymotion.com/</a></li></ul><p>Games:</p><ul><li><a href="http://rubygame.org/">http://rubygame.org/</a></li><li><a href="https://github.com/jellymann/mittsu">https://github.com/jellymann/mittsu</a></li></ul><p>Web apps:</p><ul><li><a href="http://www.sinatrarb.com/">http://www.sinatrarb.com</a></li><li><a href="https://en.wikipedia.org/wiki/Ruby_on_Rails">https://en.wikipedia.org/wiki/Ruby_on_Rails</a></li></ul><p>Embedded devices:</p><ul><li><a href="http://artoo.io/">http://artoo.io</a></li><li>Embedded ruby</li></ul><p><strong>Find a pet project</strong></p><p>I have to learn with an end goal in mind, I can’t be invested in something without knowing what I want to do with it. It doesn’t have to be a really grand goal, just something I am working towards. For most people this is the same. If you have something you want to create, you can learn, then apply and in the process solidify.</p><p>Considering I concern most of my time with web systems, whenever I learn a new language or framework, I try to build a simple shopping cart system.</p><p>The key to picking the pet project is that there should be small incremental steps that can build up to what you eventually want to accomplish. You should be able to go from simple and build up all the way to a fully fledged application.</p><p>Using the shopping cart example from earlier.</p><ul><li>Show a list of products.</li><li>View an individual product.</li><li>Add images to products.</li><li>Allow people to sign up</li><li>Allow people to sign in</li><li>Make a cart that people can add products to</li><li>Make sure the cart is unique for users</li><li>Save the cart so that user’s don’t loose it when they come back</li><li>Allow people to change quantities in their cart</li><li>Add reviews to products.</li><li>Add a rating to a review</li><li>Add comments to a review.</li><li>Make a checkout process</li><li>Send an email to a user when they have completed checkout.</li></ul><p>For the really ambitious</p><ul><li>Make a Stripe account and try to integrate it within your checkout process.</li></ul><p>Each step here introduces a new problem that you will commonly face building other web apps.</p><p>Showing a list of products introduces you to the database, fetching information from it and passing it to the browser, to display the information you get a feel for how html is generated. Notice that you don’t have to worry about styling or anything yet.</p><p>Start small and build it up from there, you will quickly learn how to write code that can be extended easily, a useful skill, even if only to save yourself some headache.</p><p><strong>Learn to Test</strong></p><p>Now you should be able to write some code. One really important concept to grasp is the idea of testing and TDD.</p><p>I used to argue stubbornly with my teachers about “why do I need to write tests for my code it’s working isn’t it?” I was never told the why, though. Another reason why you need a pet project, is that in most courses and classes you will be writing trivial applications that you are expected to finish in a week. While this is valuable to teach a single concept, you miss out on what most programmers do in their day to day. And that is maintaining huge and complicated systems.</p><p>When you write tests, the first thing you gain is the time saved by avoiding the monotony of manually having to test everything yourself. By no means will it be a catch all, but it will catch more than you will, vacantly clicking on things.</p><p>Second, if you can’t write a test for something, it usually means the way you’ve written the code is convoluted, and there are too many things happening. Simply your functions to have 1 and only 1 responsibility. A good guideline is being able to say in one sentence what it does. For example this function moves an object on the screen. Not this function moves an object on the screen and checks if it collides with other objects and deletes those objects and saves the new position.</p><p>Following a TDD approach, writing your tests first, you will have a clear interface, that will be both easier to maintain and a joy to work with.</p><p>And lastly, tests are actually for future you and other people. When you look at a piece of code, it might be difficult to understand why something was done a certain way. Tests put down the assumptions you made and verify them.</p><p><strong>Keep it clean</strong></p><p>A word of warning though. Prevention is better than a cure. No part of your program is more important than the rest. Don’t neglect your tests, don’t neglect your css, don’t neglect your file structure.</p><p>Keep things neat and it will pay for itself.</p><p>Once any of these get out of hand, it takes a lot more time to reign them in, than it would have to simply done it right from the get go. Believe me, you won’t do it later.</p><p>In my experience a lot of time in most projects is spent fighting the tools and system rather than fixing a bug or implementing a new feature. Certainly a longer running code base has a much more complex model to keep in your head. But this should not be an excuse, adding new features shouldn’t break old ones, and should be just as easy if not easier than having started a whole new project.</p><p><strong>Do something else</strong></p><p>At this point I should mention, that it will become very easy to invest all your time in writing code, you will be able to come up with more that a million excuses to why this is a good thing.</p><p>“I’m progressing in my career”</p><p>“I enjoy doing it”</p><p>“It’s actually a hobby”</p><p>The problem is your health is a use it or lose it sort of deal. As with all things in life, prevention is better than a cure.</p><p>Software development is an exercise of the mind, and in the 21st century, there’s nothing more important than intellect. We look down on people who work with their hands, people who don’t go to the best schools, or pick the most difficult subjects.</p><p>You need to remember though, that the body carries the mind, if you let your body slip, you’re mind will have nothing to work with.</p><p>So get another hobby that doesn’t require the use of your brain, no chess doesn’t count.</p><p>Do something that makes you sweat.</p><p><strong>Read code</strong></p><p>You should be getting really proficient at working on your own projects at this point. One of the key ways to ramp up your game from here is to read code and lots of it.</p><p>GitHub is an excellent place to find code, and it makes it easy to navigate.</p><p>If you have been using ruby, you have installed a gem(library/package) at some point. So try this, pick a gem you have used a few times and that you are familiar with. Find it on github, fork it, clone it. See if you can find the functions you use the most. Try and figure out what they do exactly, and how do it. See how other people have solved the problem that the gem is for.</p><p>Doubtless it might feel a bit overwhelming at first, but fear not. One of the best tools you can learn now is a debugger, in ruby this is pry.<br> <br> You can easily write a single line program that calls into that library, add a pry and start stepping through the code. You can inspect variables, follow method calls and even see in which files you are.</p><p>One of the ways I like to read code, is to get pry to tell me in which file I am, especially when going through a gem’s source. Now pry can tell you where the source is on you computer so you can put a pry at the interesting parts, and just follow along.</p><p><strong>Solve some challenges</strong></p><p>Once you have a grasp on a language or framework head on over to stack overflow, search for questions about language of framework you have learned, see what other people are struggling with. Try to reproduce the problem, understand what they did wrong, or the problem they are trying to solve. Come up with a solution. Compare it to the accepted answer, or better yet be the first to answer it! This is like using one of those answer books you wanted back in school, just it’s free and no one will say you’re cheating.</p><p>A great way to practice is through code kata.</p><blockquote>“Kata originally were teaching and training methods by which successful combat techniques were preserved and passed on.”</blockquote><p><a href="https://en.wikipedia.org/wiki/Kata">https://en.wikipedia.org/wiki/Kata</a></p><p>The idea being that you take a simple problem and practice it over and over again. Each time you delete your code 😱 and try again. Until solving the problem becomes second nature.</p><p>These are few excellent resources to find problems:</p><ul><li><a href="http://codekata.com/">CodeKata</a></li><li><a href="https://www.codewars.com/">Codewars - Achieve mastery through coding practice and developer mentorship</a></li><li><a href="https://projecteuler.net/">About - Project Euler</a></li></ul><p><strong>Write with others</strong></p><p><strong>Contribute to OSS, and create a project on github.</strong></p><p>Contributing to open source doesn’t have to be implementing new features. One of the simplest ways I’ve helped out is by improving or fixing documentation.</p><p>I’ve even done this for tools I’ve only had a passing interest in. Once I couldn’t get a tool in Clojure to work, I eventually found out it was an issue with the docs, and I submitted a PR, hopefully this saves someone from spending a few days trying to figure it out on their own.</p><p>If you find something hard to do, chances are other people are struggling too. Adding to the docs, is a great way to help out and also learn while doing.</p><p>And if you have an idea for something, why not do it? There is no harm in trying. Before referring to the documentation or searching for answers on google, just try it.</p><p>This was always in my nature and some friends and colleagues came up with the term Andre Driven Development, or ADD, it had a few clever implications.</p><p><strong>Pair program</strong></p><p>Find someone who is willing to write code with you and code together. Take turns typing, this will teach you how to communicate about ideas and how other people think. A few years back I worked in a team with an amazing culture and we paired a lot. One day in the office we had a conversation about how nice it would be if we could attribute the work to both people, so I created a gem that does that:</p><p><a href="https://github.com/A-Helberg/pair-up">A-Helberg/pair-up</a></p><p>This gem has quite a few downloads and user’s now. At the time, I wasn’t any where near proficient in ruby, and had no idea how gems work, it was fun to play with, and I learned a lot!</p><p>So once again just do it!</p><p><strong>Make friends with giants</strong></p><p>An easy way to stay up to date with what is happening in the world at large, is to follow people on twitter. But who to follow? Think of a tool you’ve been using and know to be good. Find out who created it and follow them. If you read an article you found helpful, stalk the author :)</p><p>It’s easier to learn from people who are better than you, they have put in the grunt work and made the mistakes, if you learn from them, you can save your self a lot of time.</p><p><strong>Go to Events</strong></p><p>Find a meet up group about what you are interested in, and show up. If you think there is something lacking, talk to the organizers and suggest topics.</p><p>Teach other people what you have learned, it is an excellent way to ssolidify what you think you know.</p><p>Go to your old school, college or university and offer to give a presentation on something! Nothing will get you further out of your comfort zone, and as we’ve established there is no where else to learn.</p><p><strong>Extend your boundaries</strong></p><p>You’re really good at your language of choice, you can do anything and blazingly fast. What is the next step?</p><p>Start at step 1, pick a new language and do it all again :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15535d2d1ff1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coded-coffee/leveling-up-in-ruby-while-keeping-all-your-hearts-15535d2d1ff1">Leveling up in Ruby while keeping all your hearts</a> was originally published in <a href="https://medium.com/coded-coffee">coded.coffee</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>