Life, the Internet, and Everything!

Good Programmer, Bad Programmer

New rule: “Write programs so someone else can read them instead of just you. “.

If * in86.
… some code …
Is really not much different than.
If wact=Y.
… some code …
You may know what “wact” is, however no one else will without doing a search or utilizing a split screen to keep definitions useful. Why refrain from doing something like.
If cust_acct_status=”excellent”.
… some code …
Old rule: “It was difficult to compose, so it should be difficult to read”.

– Judas in “Heaven on Their Minds” at the start of the rock opera “Jesus Christ Superstar”.

Bad programs design is still bad shows design. Replacing signs with badly called variables is very little of an enhancement. When your favorite programs guru states “prevent utilizing indicators” the genuine message may actually be something more like “make your program more readable”.

Ive been dealing with a programs project – one I truly must have done by now – and Ive been feeling both of those emotions a fair bit lately. The job, for an unmentioned customer, has actually been a mish-mash of decent to exceptional shows designs, mixed with some of the worst Ive seen for quite sometime.

” My mind is in darkness now …” – Judas toward completion of the musical, after the betrayal for the 30 pieces of silver, and prior to his suicide.

This is quite AS400/IBMi RPG particular, however here goes … One of the essential objectives for the progression from “regular” RPG to RPGIV and eventually complimentary format ILE RPG is the decrease in the reliance on signs. Indicators are constructed in logical values, or flags, that were added to the initial RPG programs language to assist with formatting reports and ultimately (green screen) displays.

As the language grew, indicators were also relied upon for inline logic structures – you could inspect a variables value, set on a sign, and then do something later on in the program based on whether that sign was on or off. The most significant problem with this technique was the resulting “spaghetti code” with all these spread signs managing the execution of declarations extremely and arbitrarily in a program.

Over time, more reasoning constructs were added to the language so that indications might be relied on less. By the time totally free format RPG made its debut, a lot of programmers quite much eliminated their use of signs for logical choices. Replacing indications with improperly named variables is not much of an enhancement. When your preferred programs expert says “prevent using signs” the real message might actually be something more like “make your program more readable”.

Gradually, more reasoning constructs were added to the language so that signs might be depended on less. By the time totally free format RPG made its debut, many programmers practically removed their usage of signs for rational decisions. They are still there, however their usage has pretty much gone back to formatting reports and screens.

“My mind is clearer now. At last, all too well. I can see where all of us soon will be”. – Judas in “Heaven on Their Minds” at the beginning of the rock opera “Jesus Christ Superstar”.

Tags: , , , , , , ,
Previous Post

How to Read the News

Next Post

Drowning in a Sea of Technology


    • Saranya sekhar
    • March 29, 2014

    What Is The Best Programming Language To Learn And To Work In IT Industry? I wish to work in IT industry so please suggest me one of the best programming language to learn

    View Comment
    1. Reply

      Usually it all depends on what you are going to be coding. there is a quite steep dichotomy between programming languages. There adv/disv are as follows:
      advantages: its the best of all, it gives you the flexibility you need to write very sophisticated programs. hardcore programs like windows XP, adobe photoshop, even google’s Robot were all developed with c++(like i heard).
      though you can’t directly program the web with c++, most scripting languages including asp/vbscript can all benefit from c++’s high supremacy, you can write programs in c++, and attach them to your webpages using asp/vbscript, most web viruses were all written with c++(not sure,not a web-virus programmer) .
      learn C++ and you will master every other language in one/two months(or even just weeks). they all inherited their styles from C/C++(c++ inherited its own style from c except for the class part).OOP language.

      Disadvantages: be ready and prepared to persevere a lot, it’s very hard to understand the concepts. its a “no-joking-around” langauge.

      Advantages: portable, very powerful language for developing secure, fast,sophisticated web applications. Most top businesses use it due to its high secured nature. used for programming most web games.OOP language.

      disadvantages: you sure can use it for writing applications but what is “do-able” is limited,its just not suitable for software programming. You must conform to its unique writing style or be sure to fight with a nagging compiler.

      Advantages: microsoft’s new multi-purpose language for both creating fast,secure software programs and professional web applications. A definite alternative to “not-wanting-to” learn c++,plus you can directly write web applications with it.

      Advantages: though other languages existed before c, i would say this happens to be where all the real hard core hyper-dimensional software programming started(though basic,assenbly language,etc existed before c). suitable mostly for interacting with external hardware/handheld devices, and memory-conscious programs.NOT OOP at all.

      disadvantages: hard to debug. not object oriented at all. just learn c++ okay!!! lol.

      Advantages: its as easy as microsoft word. easy to learn, friendly compiler, no strict programming stlye,you would write your first windows program in two minutes(actually you won’t be writing it yourself,hehe). if you are lazy, too curious to start writing programs, then be sure to go the easy-basic way. its somewhat powerful, after all whatever you can do with c++, you could do with visual basic as well(most things but not everything).

      disadvantages: when it comes to writing matured programs like Photoshop,etc, you would only be joking around if you use visual basic. it might be possible to use it for that purpose, but trust me, its probably going to be double the size of your hard disk,lol. don’t get me wrong though, visual basic’s reserves and power are unquestionable,okay!

      advantages: can still be used for writing memory-efficient applications. really good for beginners and easy to learn.

      disadvantages: Don’t even go there at all, if you really want to get a job, then just disable google search for any of them. only learn if you are looking to impress your girl-friend with a short easy-to-write “hello world” dos program.

      little advise, if you start learning c++, add extra week for mastering Stuff about Arrays(especially multi-dimensional), Pointers,inheritance classes/objects.they might appear easy, but they happen to be the blue-print of c++’s power.

      little program:
      in C++
      save as cpluplus.cpp using notepad
      int main(){
      char choice;
      char go_cplusplus = “Welcome to the party”;
      cin>>choice:”enter your choice of language”;
      if(choice==”c++” or “cplusplus”)

      View Comment
    • Candy
    • May 29, 2014

    Saving And E Mailing My VB 6.0 Programming Project? My project is saved and working well form my computer but I cannot seem to save it properly on any removable storage device.

    Even when I sane a copy on my desk top( or any other location) it does not open and says some thing about the form location….

    help because I need to make a back up copy of the project and I also need to zip the file(i don’t know how to do this!!) to forward if via email to my tutor.

    View Comment
    1. Reply

      Make a folder for the project. Light up vb and the project. Go over to the forms tree and right click and “save-as” each form and module into the folder you made. Finally, go to “Save Project As…” and save your project in that same folder. Then zip it up if you want. That will package the vb project. If you want it to be executable, you need to use the setup kit provided with vb.

      Download Winzip to make your zip file.

      View Comment

Leave a Reply