10 Days of Basic Programming, Day 1: Introduction


I like beer.

45 Responses

  1. LanceDayne says:

    I have a question,how to become a ‘ps vita hacker and exploiter?’…

    • watswat5 says:

      Once you’ve learned the basics of programming, head over to /Talk. They’ve some great tutorials on setting up development software and programming games.
      Acid_Snake wrote a really great Python tutorial for the PSP there. (http://wololo.net/talk/viewtopic.php?f=5&t=13112&hilit=python)

      You could also take a look at the recent webkit exploit. There’s some fun stuff you can mess around with over there.

  2. taliesintaliesin says:

    Good work!

  3. wololo says:

    I’ll blame the unreadability of VHBL on m0skit0 (it’s easy, since he left the scene he won’t be around to share his version of the story…. I’m kinda lame I guess).
    More seriously though, there was a huge disagreement between him and me on what constitutes readable code, and that probably led to many of the readability issues. Sometimes we would go my way, sometimes we would go his way. There were also dozens of additional contributors, and no strong rules on how the code should be written. It’s much easier to write readable code in a team of 1 or 2.

    At the end of the day, there are parts of it that I never understood myself, and I probably wouldn’t put it on my resume as an example of clean code that I wrote, but you can also question your own ability to read code 😉
    HBL and ARK both solve the very hard problem of working in an extremely constrained environment. This brings additional problems in the code, for example in HBL the need to use these weird global variables stored in the scratchpad, to avoid them being wiped out for some random reason.
    So, these are not your typical “let’s build my own app with a friendly SDK” type of code.

    • Acid_Snake says:

      VHBL was not only unreadable, it was also badly structured, ARK suffered from that too. There was no concise place to find something. This is also one of the reasons why I hate Java, the way packages and namespaces work make everything so convoluted. For example, if in python you import a module, you can’t just access all the global names directly, you still have to access them through the namespace, this makes it pretty clear where a certain class, function or variable is, in Java if you read code you never know exactly where a certain class comes from.

      • Bytesh1ft says:

        I don’t understand how programming in teams works tbh, im just starting out in programming (python & java). In an ide like eclipse or pycharm you create a project and start writing your program. This is done in one window, and you are working on one .py or .java or class at a time. So can you explain how working in teams works pls i dont understand?

        • aerinas says:

          Most teams use tools like git, svn or tfs. What these tools do is allow you to save your code not only on your local drive but also in a small cloud (a repository). Other members of your team can “checkout” this code and work on it on their local drive. When one is done editing a certain class he/she can upload it back to the repository. This way multiple members of a team can work on their individual parts of the project. Meanwhile, in the repository, it all comes together.

  4. perfig says:

    Good 😀

  5. Brian Witzberger says:

    First! I would like to say nice tutorial…I would also like to learn a bit more also I’m how shall we say very ecentric. And a nerd and worked for the phone co. For 20 plus years installing switching equipment and programming the switches.but that programming is a totally different ballgame. I love to hack anything! ™

  6. 2die4 says:

    Nice can’t wait to read more got to learn objective c last thing I ever learnt was basic lolz

  7. TheButtonMashers says:

    Great! I’ll keep an eye out for the entire series and make time to actual digest it. I’ve been learning to code on and off for more than a decade. I eventually lose interest receive conflicting recommendations and end up just putting it away to try again later.

    I’m really interested in your articles because you clearly state your intentions and offer reasons for your recommendations. I usuallly get the oh do it this way because reasons… Use this, learn that because (insert some form of I was taught/learned this way). It just makes me question if I approaches until I freeze up and quit.

    Thank you very much.

  8. Alextwolf says:

    I commend you Acid for doing this. And what’s really interesting is that a few weeks back I wouldn’t have understood what you where talking about when referring to language and syntax. I myself decided to start learning programming and then hopefully develop something I have in mind in the future. I just want to mention that on YouTube, if you look up introduction to computer science and programming. You will come accross a course by an MIT professor. Not taking anything away from you Acid as I am looking forward to your teachings since they are geared more towards what I want in the end…best of luck

  9. jhorman says:

    excellent .. no doubt seguire these teachings, I have always wanted to contribute to the scene’ve had ideas for me but always crashed against the wall of the lack of knowledge .. in fact recently started to study programming and these snap that will serve me. . I hope the next …

  10. I don’t understand the emphasis on keeping things readable. I mean if you are trying to help the scene or working in a team it could save others time, but what if you are working alone? If you are making an indie game wouldn’t it be better to be messy AF to make it annoying for people trying to steal/reverse engineer your work?

    • zorak_torok says:

      This much I know… It is like going back and trying to read cursive that you yourself wrote. My writing sucks unless I take my time, so, sometimes I cant read my own writing… or atleast it makes it hard to. When I did websites, I used html instead of an editor. Trying to change a layout or just add a field where you want it to on a page is hard to do when you just jumble stuff together. I am sure the more advanced the coding, the more the effect is true. As far as getting your work stolen; if your the kind of person to do that…. guessing in theory on my side, what ever is trying to be stolen would be easy to change the required stuff just by searching keywords to change that ties it to the original author. Code can be contradicted to provide the desired outcome based on the order of requests.

      • DayVeeBoi says:

        Im no “guru” lol, but my understanding is that If youre worried about getting your code stolen you dont release source code, just binaries or prepackaged software that is only machine readable. So to reverse engineer the software, the original code (where readability matters) will never be seen.

    • Acid_Snake says:

      What you point to is obfuscation, nothing to do with code readability.

    • RandomDude says:

      Even then it is better. You put your game out. Homebrew is – lets face it – a small scene, not many play your game. Months pass till someone hits the final level. Game crashes. The bug is easily reproducable and looks like something you can fix in one or two hours work. It takes you two days, because you forgot how your code works and it was not helping you to get a easy reentry.

  11. zorak_torok says:

    Thankyou good sir for deciding to take the time to do this. I for one will read them and try to put them to applicable use….. I say that then I willl realize how little time I have and end up not following through…. but the knowledge I will hopefully obtain will help me on small projects. Okay, been a while since I drank posted… I hope this odd thankyou comes across atleast half the way I wanted it to.

  12. Reader says:

    Not to spoil your effort:

    1) When you want to teach you should teach something to flex your skills (and by extension contribute something new). It is really hard to get the scene-gurus to share their knowledge openly (no its not because of legal issues – its because they love the fame and hate to teach the competition).

    But teaching C is not a contribution in this day and age. Go further, start at your current project and detail it. Let others bounce ideas off of you and start working (openly) together so more can join in. C is something really simple to pick up on the interwebs 😉 Take a look at Harvard – http://cs50.tv/2014/fall/ – they took the time and money to make it shiny.

    2) The idea of diddling with the pre-processor is problematic. You create a “C” that others can’t use. Depending on how you do it, it has drawbacks. Trust me, you are not the first to do weird preprocessor stuff – C is OLD … all has been done 😉 Doing C OOP style (naming conventions etc.) on the other hand is a very noble effort.

    3) While I agree that C on noobs creates bad code, its not really because of C … its because the noobs have not been told style. C doesn’t come with style because it was created before language creators invented it. Today you pick up ruby and you get told how you “should” do it. Ruby is a multi paradigm language. You can write stuff in n different ways – potentially. Look at C# – that thing has “ref” and “out” – I have seen people exclusively use those nasty anti OOP tools 😉

    4) I still wish you da best my man! Will creep watching ya ;D

    • Acid_Snake says:

      1) I can’t teach advanced stuff when most people here are strugling to learn the basis. This tutorial is for the future exploiters and homebrewers, not for exploiters and homebrewers now.

      2) I believe you don’t know what CbC is. It is NOT fiddling with the C preprocessor, it is creating a sort of external, very specific, preprocessor (alrhough it functions more similarly like an IDE). It makes C code look like a TOTALLY different language, but it is still C. This can’t be achieved with the C preprocessor.

      3) I agree that it’s not C’s fault that it leads to bad code, I should have mentioned that in the post. C# is NOT the example to use when talking about clean code. C# as a whole has a very modern OOP design, which C++ and Java lacks, but it still FORCES you to put everything inside classes, which IMO is the worst thing a language can do – sometimes the cleanest, simplest and most readable way to do something is a function, not a class, not a namespace, but a simple function – and it still maintains the horribly aweful classic 90’s OOP.
      BUT, while I don’t like C#, I do believe C# is what Java should have been and I appreciate it as a language, specially since it is very aware of the huge flaws Java has, I just wish Microsoft would have made it a TRUE general purpose language and not a Windows-only thing with OOP up-your-*** from the very start, then it would have definitely replaced Java in every way and I’d be a happier man today.

  13. Gikero says:

    I’ve always felt like those who create, exploit, tinker and mod are the true “geniuses/wizards”. I’ve been following PSP homebrew scene since 07 and was really proud of my first pandora battery and CFW flash. But, I have a desire to be part of the group that forwards the scene, instead of following it. Even if I don’t end up doing it, gaining any knowledge and understand is a desire of mine.
    I’m rambling, but what I want to say is thank you Acid for taking the time to make this tutorial. I’ll be following this series!

  14. jamski says:

    …and we’ll be expecting for this article to become more “readable and understandable”…

  15. nebu_187 says:

    Very interesting! ill be reading all the tutorials, for sure.

  16. SAL2K says:

    Its a big commitment. Great work!

  17. kh3 says:

    will keep an eye on this. hope this tutorials become a permanent section , so we can boost the scene a little.

  18. Student says:

    It’s good that you are introducing basic programming, but for a 10 day guide, you’ll only at most cover up to function calls. There’s just too many things to introduce that play key roles in analyzing software and developing. You would have to introduce segmentation faults, overflows, pointers, vectors/arrays, race conditions ect ect. Data types should be your day 2 guide, you have to definitely explain what types are available for people to use. Then you follow up with modularity and how it’s useful to write reusable functions that can be included in other programs.. ect ect. Introduce some basic things like while loops, for loops, break statements, continue, if, else if, and some recursion too so people don’t end up writing 100 lines of code just to code to 100….

    • Acid_Snake says:

      This is actually going to be a 40 days features, but they are split up into 10 days a month, each month covering different levels. And the blog post is not the only place where we’ll be covering this. All the theory will be here, but the practice will be in the blog section. And trust me, it only takes 10 articles to cover all the way up to structural programming in terms of theory.

  19. meysam25 says:

    plz dude go for ps vita hacker and exploid i like to know bout vita hack or exploid

    • meysam25 says:

      psp hack is fun too i thing its be great if you learn us psp hack
      becuse you know every thing about psp .
      plz start with psp hack
      every one have psp or if they dont they can buy becouse that is chep
      psp hack is great start for start

  20. Tom says:

    Very much looking forward to the rest of the series, I can see this being very useful for me. Thanks Acid _ snake!

  21. alpmaster says:

    I love illuminated key boards never had one in my life though… 🙁

  22. Arc Futahito says:

    I wouldn’t start like this. From what experience I know, the best possible thing you can share, when you introduce person to a programming is understanding and visualization of algorithm. Because there’s nothing more pathetic in programming than a person who can write code, but doesn’t understand what’s the actual point in writing that $s = s+1;

    • Acid_Snake says:

      Algorithmia – calculating complexity, avid algorithms, backtracking, etc – is defeinitely something not for beginners.

      • not really says:

        calculating time complexity isnt very difficult and if youre working with python which is what most beginners first learn then it should be fairly straight forwar considering how python is like english..

        • Acid_Snake says:

          Now I get the idea that you have ZERO knowledge of what algorithmia is. What the heck does Python have to do with complexity? Algorithmia as a whole is language independent.

      • Arc Futahito says:

        I don’t say to go *** deep into this stuff, but getting to know what a conditional branch is would be awesome and universal knowledge

      • Arc Futahito says:

        I don’t say to start with complex stuff. Knowing branches and loops is universal knowledge for a programmer. For example, I’ve never coded in C, but when I saw code snippet from one of previous news, I knew what it did the moment I read it. Just because I understand syntax.
        P.S. Not sure why my previous comment just disappeared. I didn’t violate any rules.

  23. Although it is very early in the tutorial for people new to programming, I did want to pass this site on to others and the op in case he wants to use it similar to a guide. Mainly because he walks through the code (assuming you have somewhat of an Idea of how c++ works) and it ends up with the user creating their own 2-dimension space shooter game using the Allegro Library.

    tl:dr; – Here is a tutorial for 2-d game dev. with c++ and the Allegro Library

    site link: http://fixbyproximity.com/2d-game-development-course/

  24. CPUzX says:

    WHY do people keep on complaining, when valuable, informative, useful, helpful content like this is blogged on the Wololo front page?

    Can everyone stop FORCING their useless, invalid opinions and actually lay down your own opinions as alternative; rather than direct critism? Good.

    This is a very useful guide, Acid_Snake. I’ve always appreciated your efforts, as much as Yifanlu.

  25. jose says:

    When will lessons to follow be delivered?

  1. March 16, 2015

    […] <<< Previous: 10 Days of Basic Programming, Day 1: Introduction […]

  2. April 1, 2017

    […] do I start question. For a beginner the information available can feel overwhelming. Even the series on programming by wololo’s own Acid_Snake can feel like being asked to run the marathon while you’ve just learned to about […]