{"assets":[],"author_link":"author\/7dare\/","author_name":"7dare","cat":"Uncategorized","categories":["Uncategorized"],"comments":[],"epoch":1394253840,"event":"","likes":5,"metadata":{"p_key":"79985","p_author":"7dare","p_authorkey":"0","p_urlkey":"288995","p_title":"Why batch wins","p_cat":"Uncategorized","p_event":"LD28","p_time":"1394253840","p_likes":"5","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1386892800","event_key":"20","event_name":"LD28"},"source_url":"2014\/03\/08\/why-batch-wins\/","text":"<p>Batch is a scripting programming language introduced back in the time of MS-DOS by Microsoft itself. It started off as something basic and very slowly evolved to be the slightly version it is today. You may have heard of batch simply because it\u2019s the same language as what you enter in the command prompt. For example, when you enter \u201cping\u201d in command prompt, you can also enter it in a batch file. And as you enter \u201cECHO hello world\u201d in batch, you can enter it in command prompt (noob note: <a href=\"http:\/\/en.wikipedia.org\/wiki\/Command_Prompt\" target=\"_blank\" title=\"Wikipedia Command Prompt\">command prompt<\/a> is like terminal in Linux or OSX).<\/p>\n<p>I recently posted here <a href=\"http:\/\/www.ludumdare.com\/compo\/2014\/03\/07\/starting-off-in-batch\/\" target=\"_blank\" title=\"Starting off in BATCH\">about a game I wrote in batch<\/a>, which is quite good for something only 5kb and ~150 lines of code.<\/p>\n<p>Batch also has the best debugging you will ever had heard of, as you can edit the code WHILE the program is executing. That means if you find a bug, you can create a loop around it and tweak the code until it works and then remove the loop without having to launch the program 10 times.<\/p>\n<p>Batch is not cross-platform at all (or at least it\u2019s very complicated) but it works on all Windows machines that ever existed (except for a few commands that appeared later). If you like, you can very very easily <a href=\"http:\/\/www.battoexe.com\/\" target=\"_blank\" title=\"Batch to exe\">convert batch files to exe<\/a> so people can\u2019t read your code.<\/p>\n<p>Batch is very easy to use. In fact, I learned it by experimenting. \u201cECHO My name is George.\u201d is something a baby could write and \u201cSET \/p name=Your name is: \u201d is something a child could write. They\u2019re also very easy to launch: just double-click the .bat file and you\u2019re all set.<\/p>\n<p>Finally, it includes a single command that is in every programmer\u2019s dream: GOTO. GOTO covers every notion of loop you can imagine, and, combined with if, can make a whole program\u2019s structure way simpler. Most newer programming languages dropped it for unknown reasons yet it turns out to be easy to use and very efficient and helpful in batch.<\/p>\n<p>Now I hope \u00a0you will stop whatever you\u2019re doing and batch or not, and I wish to you a good programming!<\/p>","time":"March 8th, 2014 4:44 am","title":"Why batch wins","title_was_empty":false}