As many of you already know, I am a regular mentor on Dream.In.Code. With that I see common mistakes and design issues more than most people will probably ever seen in their full career. One design issue I would like to talk about today is the role of the main method and why it should be treated more like the conductor of an orchestra than 10 different band members. The ...
One of the first scripts people new to PHP (or any server-side scripting really) create is a login and logout form for their site. Often times beginners get a little confused as to all the parts necessary to creating such a thing. So I thought it would be helpful if I showed a really basic and easy to use PHP login / logout script. The script uses an existing database ...
Someone came into the Dream.In.Code forums the other day asking about batch renaming of files using Python. I thought I would work out the example for everyone to see and create something that they could add to their own personal libraries of code. Python makes this pretty easy to do using "os" and "os.path" but one tricky part I found was dealing with the method isdir() and similar functions which ...
Like me you probably have several YouTube channels that you like to follow. Maybe you enjoy that crazy cat video channel or the channel which shows stupid people doing stupid stuff. Either way you want to bring those favorite channels to the world in all their glory on your site. One thing you want to do however is combine those channels into one feed and display the feed on your ...
Around this time each year we mentors on Dream.In.Code see a bunch of students and beginners, attempting to do there final programming projects, come on the boards asking for help with coding problems. Some even come on asking for ideas to help them out and a large majority want help with simple games they can do like connect four, "the snake game" or even Tic-Tac-Toe. Then each year we throw ...
Over the past couple weeks I have noticed a lot of students asking questions about counting number frequencies. The student is often generating, or asked to take in input, and count how many times a series of numbers appear in the data. Sometimes they are given a file for the input and other times they are asked to take in numbers entered by the user and count them. So I ...