26

I noticed that a lot of people are ranting about writing code on paper in the wk92 rant, but that got me thinking: does anyone here write something like "pseudo-code" (or some kind of plan) on paper before they type out their code?

Comments
  • 6
    When I'm whiteboarding and working out how different components in an application or different technologies interact I often do this. It helps people get the general idea and keeps the discussion moving forward without getting bogged down in syntax.
  • 3
    Yes, I like writing sudo code to help map my functions out and, in "plain English" I'll walk through logic a function needs to achieve.

    It helps me find pitfalls or bad logic in initial ideas before I start coding. It has saved me many hours of frustration by planning ahead.

    It's also good when you need to write documentation as you have "plain English" steps for your code already written.
  • 7
    I sort of do this on a whiteboard.

    I draw out the overall flow, and sometimes the rudimentary logic if I'm working on something specific.

    It often looks like a neatly-organized clusterfuck. Helps so much, though
  • 0
    @1989 Huh? No-one was implying that they are the same thing....
  • 3
    @FoolsGambit @1989 unless it's Python 😋
  • 2
    @Vip3rDev "sudo code" 😆 But thanks for the insightful answer.
  • 1
    was waiting for someone to catch this. 😂😂 @darkmiko
  • 3
    I find it kind of fascinating that many people seem to prefer to use white boards for their planning. No one into paper?

    I keep a notebook at work which has all kinds of random notes and diagrams and flow-charts and whatnot. It helps me refer to stuff I did in the past, because I legit cannot remember what was happening in my head on Friday when I come in Monday morning.
  • 2
    I use Office Lens to snap pics of my whiteboard sessions. It can auto sync with OneNote which I use for my dev notes so that's how I keep track of the work.

    Only because work doesn't like to waste paper but, a notebook would work fine too..
  • 2
    @Vip3rDev I do something similar using Trello. Photo's of your whiteboarding sessions and Trello boards are a great way to convince people you have strong teamwork skill and look great in your Readme's on GitHub.

    @darkmiko Whiteboarding is more of a teamwork thing - having everyone standing around a whiteboard is a much better way to do planning in teams than sitting round a desk with laptops in front of you, at least in my experience.

    People being on their feet tends to make them pay attention and be more willing to contribute. I still scribble away on paper occasionally when I'm at home though! 🙂
  • 1
    Ahh, not a fan of Trello but, sounds like a good workflow!

    If a project is in Github then I use the Zenhub add-on to manage it as I love their Agile board features and extra reporting. I usually stuff notes and other screencaps there too. @FoolsGambit
  • 0
    I do it on school when calculating the complexity of something I wrote earlier the day in big O during boring classes.
  • 1
    @Vip3rDev Awesome! I've tried a few similar kanban's but hadn't heard of Zenhub before now. Guess I have a new toy to play with over the weekend 😁
  • 2
    In college I had a few exams that obliged you to write pseudo code before actually developing the app. The moment you started coding you weren't allowed to pick up your pen again... but you were allowed to use google/stackoverflow whilst coding.

    In my opinion this were the best exams ever, because it resembles the real world.
  • 2
    Yes, I do find it pretty useful. I prefer to think about the logic and the functionalities of my program before jumping on the IDE and write code.

    I don't necessarily just write pseudo code, sometimes I just sketch a flow chart or a state machine and run some test cases from mind to see if there are any potentials issues or bugs I can spot early on.

    It can be a huge time saver.
  • 3
    Im with @mohamed. No 'pseudo code' as such, but occasionally use some kind of flow diagram (on paper or whiteboard) to figure out what my logic should be. Especially helps with situations that involve some kind of permission model.
  • 1
    I keep a pad of graph paper at my desk to draw out logic and relationships between data/components/architecture/etc. Being mainly frontend, I'm visually oriented, so diagrams are more useful to me than pseudo code
  • 0
    I take notes about what i want the app to do and the main layouts, but i dont plan the pseudocode on advance
  • 0
    Absolutely I do
  • 1
    I like to keep it on paper as well. Tracking of current tasks, research on it and pseudo code.
  • 1
    An assembly language class has me doing it more than I was normally and it has saved some headache.
Add Comment