Tuesday, December 13, 2011

Website


I am starting slow. I know that I need to have a good foundation in order to be able to have a stable product. I cannot rush this.  I have started by updating my website; this serves two purposes: firstly, I am taking an easy HTML class and needed to get reacquainted with it, and second, the website is the first thing people see before trying the product. My site was too simple and plain.

While it is still in progress, it is getting better. I have the basic layout designed, and now need to add content. What is present is enough to get you around, but it is lacking. Everything will be uniform, even the update pages.

I have decided that updates will be different in Raven, rather than being downloaded from the program, updates will by only available for the web page. Raven will tell you there is an update and take you to the webpage. Each update will have its own page with information dedicated to that update; this should help when there are major changes through the development.

Lastly, getting some creativity from making the website better will help the rusty cogs in my mind to start turning fast enough for me to get some code into the IDE. I am trying to get myself into the programming state where I can write good code very quickly. I aam getting close to that point.

Sunday, December 11, 2011

Raven design


I am doing Raven differently. I started with paper drawing and designs of what it could be like. I wrote out all the things that it could do and determined the things that it will need to have. This is much in contrast to how I did things with Scott’s Gmail Alert.

Scott’s Gmail Alert was designed around the alerts. Once the alerts were made, I added more options until it continued to grow. Where in the problem lies, this ended up making it so that parts had to be rewritten since they were not compatible with the new code, or duplicate code with very minor differences had to be added. That is not very efficient. Also, SGA relied on the computer’s memory too much.

Raven is going to combine the strengths of SGA, Terrie’s Recipe Manager, my group project for Advanced Visual Basic class and Smart Thinking. SGA was great for its alert management and large number of options. Terrie’ Recipe Manager has a very useful interface. Smart Thinking made good use of modular code that was independent. My group project was able to maintain data using databases.

Raven needs all of these things to be successful. Memory management, being lightweight and able to silently run in the task bar are going to be the main attributes that will allow Raven to be a great email alerting client.

While I have not written any code yet, it will start soon. I am trying to get over being sick at the moment, so that I will have a clear mind when I start. I am going to begin with setting up a special directory and try to start organized – so that I finish organized. 

Wednesday, December 7, 2011

Raven


I have renewed my interest in coding. Classes are over and the break is starting. I will have a lot of time to sleep and recover from being sick. While Scott’s Gmail Alert has been very stable for this year with very few major issues reported, I have a longing to do something bigger and better than SGA. I envision a program that acts as a full-fledged email client, yet is small and runs silently in the task bar. Email should not be complicated
.
Personally, I am techier than the average person that I come across and have different needs when it comes to my email. I don’t need to ask how to attach a file. In fact, there are times I wish I could do more with my email. The client that I envision is simple to use and able to be programmed to do things no other client can do. A user may which to interface with another peripheral, run a script or manage a database. One contact may be more important than another and require a more obvious alert. The possibilities are endless for what could be done.

I am announcing my new project: Raven. With full support for IMAP protocols and the convenience of SGA merged together with new features and ideas. Raven is a sort of code name since the project has not even really started yet and has no name. I don’t want to concern myself with naming it at this time, I’d rather build it. There are many things I want to improve on with SGA, but I don’t see much future for a program limited only to Gmail.

I have decided, and hope to follow through with, that I will post progress to this web log. My thoughts and ideas, programming techniques and maybe even some code will be included. My goal is twofold: I want to document the process all while creating a great new program. Current users of SGA will be able to have a reduced upgrade price for Raven, if they wish to leave SGA; new users will have the option of either a trial version of full version for a low cost.

Raven’s user experience will start in the installer. I will not use a third party installer, instead I will create my own to ensure that from the users perspective, Raven is there to make life easier. There will be opportunities to help with the project in the future.

Raven is named after a unit in the game StarCraft 2 until a final name can be decided on.

Technique


I have learned a few things in my time programming that might save you some time. The ideas shouldn’t be new, but you might not have taken them all that seriously. The first tip is probably something that anyone working with computer has heard at least one: backup your work. The second tip: finish your work in the correct place.

Backup your work

This is more than having another copy of your code saved somewhere safe; yet still, it is a good idea to save your code in multiple places in well labeled directories so that you can find what you need, when you need it. Backup while programming is much more involved. Since your work is always changing and can contain thousands of lines of code, it is near impossible to revert back to where you started if you mess something up. Since a program is modular, you can easily finish a module and make sure it works before starting on another section. This is a great time to save your work, and make a copy. Anytime you want to veer off and try something that you are not sure will work, save your work and make a copy. My reasoning is that you will be able to go back to a point where you know the code worked. Trying to go back and revert changes can end up creating more mistakes in the long run that you have to debug and fix. If Visual Studio, or whatever IDE you are using, crashes and corrupts the file you are working on, you can go back to one that you know works.
If you are like me, you heard about backup and didn’t think it was too important. I figured I would be okay too, until one day Visual Studio corrupted everything. I could not recover any of my work and had to start over from scratch. There were other times when I made drastic changes trying to debug a problem and ended up making things worse. I hate the feeling when my head feels heavy and my blood is boiling because I can’t fix something that worked before I decided to experiment with a different idea. I was so close to being done for the night, but gave myself extra work that had to be finished… because of my second tip.

Finish your work in the correct place.

This might seem a bit abstract, but it really is an important point. Think about when you write a letter or a paper: would you take a break in the middle of a sentence? Probably not, because you want to complete the thought before it is lost. It is the same with programming. Making comments for yourself about what you are thinking and what your ideas are for continuing really help you get back on track with where you left off. Alternatively, you can send yourself emails of your ideas, if that suits you. The important thing is to remember your thought process and the ideas that you have tried and considered trying. It really is best to finish the day when the part you are working on is complete and working. This will allow you to start fresh the next time you sit down and able to pursue different parts of the program without having to get back in the mindset of a previous day.
This idea of where to stop for the day is abstract since everyone is different. You may be able to pick-up right where you left off with no issues, you may not. Just remember, if there is a serious flaw in your code and you have been trying to fix it for hours, keeping notes of where you have been and where you are headed can greatly improve your productivity. Try different methods like commenting the code and emailing yourself to see what works best. I find emailing myself can help keep the issue in the front of my mind so that I might be able to come up with a solution even while I am not sitting at the computer coding. 

Code block

I have not written much in a while. For a long time I have felt worn out and tired down to my bones; I have had no energy to do much of anything. In contrast, there have been times when I couldn’t do anything other than write code; it practically consumed me. It is for that reason that I have been burnt out for so long – I haven’t found the safe medium where I can continue to be creative and have energy to keep a healthy momentum.

The amount of energy it takes to write code is amazing. I don’t think about my project when I have time to dedicate to development exclusively – I go as far as dreaming about it in my sleep; I think about it in the shower and on the drive to the store. While this is happening I am able to get things done quickly and solve problems extremely well. The issue arises when the headaches start and my concentration becomes short. It has been so bad for me that I have dropped some of my classes in college because I could not focus on anything, even the easy stuff. I graduated Magna Cum Laude with my Associates Degree; I should be able to do it again with my Bachelors.

So what is a good way to keep things under control? From what I can tell, playing video games is a great way to avoid burn out. There is an exception: only play games that don’t require too much thinking! I have been playing StarCraft 2, which is known as a thinking man’s game because of all the strategy involved, and it has helped increase my burn out. Playing something like Left 4 Dead or Angry Birds is much better to cleanse the mind. The point here is to entertain yourself and get your brain to stop thinking so much. It needs a break!

I have felt my health declining for a little while now. I notice that when I am programming or playing games that I tend to eat too much and get no exercise. This could be one of the reasons I feel old and achy. Getting out of my comfy chair to do some activity would be a good start. My wife has been giving me vitamins that are supposed to give me more energy.

I can feel the rusty cogs in my head are starting to turn; I am getting ideas for a new project. It will be hard to change the way I do things, but it should be beneficial in the long run to try and balance my time so that I don’t get burned out so fast. Being more active and eating better will help. Working on individual sections at a time and taking break will help. Playing games will give my mind a rest.

Skills

I have been at this stuff for awhile, yet I still don't have any idea what part of programming I am best at. I always keep my interests in finding a need for a piece of software that could be useful, at least to someone. My most successful projects began as programs that I had a need for personally. Programming is not as simple as understanding the logic and syntax, you have to have the ideas and enthusiasm to complete a project all the way until it is finished. The hierarchy in picking a career path does not end once you decide to be a programmer: there are so many aspects within the programming world that you may never experience.

It seems that video game programming is the most well known, as far as I have noticed; it is also a very diverse segment in itself. It is very difficult to create a game by yourself. An individual cannot get things done as quickly as a group. An individual cannot be talented in as many areas as a group. What exactly would you do as a game programmer? It is about more than writing the code; a game requires many different types of programming to be successful:

· Logic programming to control the aspects of the game that are not static. Things like gravity, sprites, and projectiles.

· Network programming to allow for online multiplayer connections.

· Graphics programming to maximize graphical performance and have the best graphics.

· Interfacing programming so that the awesome code that was written can be used easily and fully by the user.

· And several more could easily be included.

So my point? My point is that being a programmer is like being a piece in a puzzle. While you may have the power to create applications on a small scale that doo amazing things, your power can be exponentially greater in a team of individuals with individual talents. You have to be able to work on your own or in a team. There are times when you will need to do both in order to succeed.

Even with the projects that I have worked on, I have had the help and support of other people who share an interest in the project. It is amazing how the internet allows people to come together to create something. Even if someone doesn’t have the experience to write code, they can be instrumental in helping create a great program because they have insight from a different aspect then you might have. Your program could do everything and clean the dishes, but if it is hard to use no one will want to use it.

Sunday, May 15, 2011

Variables

Programming is based on mathematics. Variables are used in the same manner as in an algebraic formula: storage. The only thing that is different is that they are much more advanced in what they can do. Variables are the most basic of objects used in programming.

Like in math, we need a place to store numbers. That is where variables for the type short, long, integer, and double are used.
short: Limited to being between -32768 and 32767
long: Limited to being between -2147483648 and 2147483647
integer: Limited to being between -2147483648 and 2147483647
double: Limited to numbers with decimals
The main difference between the different types is that they use different amounts of memory. In most cases short variables will suffice, unless you are working with really big numbers. Most people seem to default to integers since memory is not very limited any more, yet I still like to use shorts whenever possible.

Now what if you need to declare something other than a number? What else can variables store? Strings of characters are another common thing for programmers to store. A string in simply a list of characters that make up text.
This is a string.
There are to variable types that can store characters:
Char: Stores one character.
String: Stores an array of characters.
Again, the difference of the two types above is that the memory required to store one character and storing a list of them is very different. Most commonly a string is used verses a char.

Sometimes you may need to keep track of whether something is true or false. This is the core of a computer system relating directly to the binary in which it operates. As a variable, we call them of the type boolean. Any variable of the type boolean can store a value of either true or false.
Additional, you can store advanced objects into variables. Advanced objects are ones that you create using classes and structures. While these advanced variables might not seem very useful at first as you begin programming, later with more advanced programs you will find that they are very useful and save a lot of time.
Structures: As the name implies, a structure is an object that contains things, much like a house or a building does. While these things are not like those of a house, they are important to the programmer. The structure is a collection of other variables, like shorts and strings. The big difference between the basic variables and a structure is that a structure holds much more information then a basic variable.
Classes: A more advanced structure is called a class. Each class is similar to a structure as they hold many different variables, but in addition a class also can hold subroutines and functions that can be used to ensure that the data stored in the class is correct. This is very handy when it comes to classes that store calculated data by having the calculations occur automatically when a new object is dimensioned.

Visual Basic:
Dim number as short
Dim trueFalse as boolean
Dim myText as string
Structure customStructure

Dim name as string
Dim age as short
Dim phoneNumber as string

End Structure

Dim myStructure as New customStructure
Public Class customClass

Dim name as string
Dim age as short
Dim phoneNumber as string

Sub New(name as string, age as short, phoneNumber as string)

Me.name = name
Me.age = age
Me.phoneNumber = phoneNumber

End Sub

End Class

Dim myClass as New customClass

Wednesday, May 11, 2011

Getting started

Programming is not something that is static. As you continue to create progjects, you style and solutions will change. The basics of programming will not change, no matter the language that you are using.

Current programming technology encapsulates Object Oriented Programming (OOP) as the main basis for allowing interaction between the user and the computer. Event driven coding has replaced the old line coding in the early days of computers.

What is OOP? Objects surround us in the real world, yet most people probably don't examine the details of objects as fully as they could. Without objects, what would there be in the world? Think about what an really object is: It is a physical thing that you can touch, therefore it has texture, shape, coutour, weight, size, mass, and color. Depending on the object it may only have one purpose, or it could have several. Programming objects are the exact same, they have their own parameters and characteristics.

When I wrote code using DOS in a language called QBASIC, often times the programs were very limited in scope. Each program did one thing, and did it well. Now with todays technology, applications are required to do many things at the same time, and often are required to duplicate themselves to complete the task given. This is where objects are needed. As a programmer, you must identify all the aspects of what your object is made of. What is the problem that you are trying to solve with your program?

Event driven code is another important thing to learn about. Back with DOS, code executed line by line until the program was complete. This was before users could use a mouse to make selections, and the major of the computer systems were text based. Event driven programming involves code that only runs on an event, like the user clicking a button. Subroutines and functions become a big factor in event driven code, and thinking modularly is very important. Event driven code can stay dormant until it is used, or be used multiple times by the program.

The first post for #learningcode

I work at a college as the computer lab assistant of the library. While I consider myself to be above average in computer skill, I feel like my job is not very challenging. Answering questions all day about how to print a document and how to setup the formatting is no more a challenge then getting dressed in the morning. Therefore in my free time I do what I love: coding. Writing software makes you think, it is not an easy process that one can just memorize an answer to.

Coding is a skill. While anyone can do it, those who are more technically included and who are excellent problem solvers are more likely to succeed. I consider myself to be creative in my means, and detailed in my results. Debugging is a major part of programming, as is the user interaction.

Though my work in High School, to my many attempts to create a successful program that user want to use, I have learned a lot. Because of this, I have decided to start this blog, to help others with the theories of programming, and the aspects that cannot be forgot.

As a lab assistant, I see many aspiring programmers struggle with some of the most basic of programming ideas. It is my goal to help with the basics, so please feel free to ask any questions that you may have.