Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Monday, January 16, 2017

Language and Code

            So, back in the fall I decided I wanted to learn programming. It wasn’t the first time I decided this – I’ve long had an interest in making my own video games and such – but this time I actually went ahead and did it.

            I started with a few free phone apps, but quickly came across a slight problem – most of the apps were teaching me a programming language without really explain how to code. It all seemed to assume I had a pre-existing knowledge of coding and programming terminology and, as such, I had to extrapolate a lot of information from context.

            When I came to the end of the free lessons in the best of these apps (it didn’t even tell me which programming language I was learning – I believe it was either Java or Javascript), I decided to look for something that taught a bit better. To refine my search, I decided to look for a specific language tutorial rather than casting my line out and seeing what I caught – my thought being that if I could find something that taught well enough, the terminology and skills could transfer to other programming languages.

            I decided to lean C programming, as my research revealed it to be one of the core programming languages. My search soon popped up with this site for C++, an upgraded form of C. Within the first few lessons, I knew I’d come to the right place. Rather than just telling me how to code, it goes into detail about how programming works, so I actually understand what I’m being taught to do. There’s even a review from a university professor saying this free online textbook is the best programming textbook he’s ever seen.

            So, now I’m buzzing along, learning to code and loving it – it comes naturally to me and feels like one of the things my brain was designed for. I’m not very advanced yet, mind you, but I’m getting there and making a list of programs to write once I have the skill.

            For now, though, I thought I’d share with you one of the things I find the most interesting about programming. It’s one of the things that inspired the thought process of, oh, three blog posts ago – how everything is broken into smaller pieces.

            You see, a programming language is just that – a language. It has certain words you use to combine together that tell the computer to do something. A line of code is like a sentence – only it ends with a semi-colon rather than a period. Code is broken into paragraphs called functions that look something like this:

Type of function and its name()
{
            Lines of code that give the computer its instructions;
            Just for appearances, we should have multiple lines;
            After all, a single sentence paragraph is boring;
            Also, there are usually more numbers;
}

            A program as made up of a bunch of functions (among other things) and they work together through logical progressions to make whatever the program is for happen. Just like how words, sentences and paragraphs fit together to tell a story.


            It makes so much sense, yet it never occurred to me that that was how it would work. When you think about it, the familiar structure makes it easier for programmers learn the new language. Plus, as with everything else in life, it means that if something is too big to accomplish, it can be done by breaking it down into smaller, more manageable, pieces.





Click here to find the charity anthology containing a couple of my short stories.




Also, make sure you check out my wife's blog and her life coaching website.


If there's any subject you'd like to see me ramble on about, feel free to leave a comment asking me to do so.

Monday, November 17, 2014

Software Relationships

            This morning Colleen came to me with a brilliant metaphor, so I told her to write it down because it would be perfect for this week’s blog. Besides, it’s been far too long since we heard from her. So, without further ado, I give you my wife.


At the risk of creating another one of those ideas that begins "Life is like a ham sandwich..." it came to me that relationships are like software.

At first, when you download your packet, you're so amazed and excited by all the new features. You enjoy it in all its shiny, brand new aspects and for a little while it's the epitome of perfection.

However, every program has its bugs. Eventually you discover one, then another and before you know it you are wondering if it was worth it downloading and installing the program in the first place.

Then you're faced with a choice: uninstall and try and find another program with fewer problems, or deal with the issues as you can. Because if you're creative and determined, most problems have fixes if you persevere.

Though not everything can be dealt with. You will always have those glitches, those odd little bumps and twists life is prone too. Because nothing is perfect, because humans are not perfect.

Some people download, then uninstall perpetually, ever searching for the perfect program to fit their needs. Always seeking the new or the different, convinced it is the program's responsibility to form to their needs, without effort and without thought on their part.

Others, those lucky few, discover a program early in life, decide it is just good enough to work hard at the remaining glitches, and live happily, understanding that inherent imperfection that humanity – and therefore software – is prone to.



            There you have it – life is like a ham sandwich, relationships are like software programs and, without further ado, I'm taking my wife back, because when I said I was giving her to you what I meant I was lending her to you.





Click here to find the charity anthology containing a couple of my short stories.






If there's any subject you'd like to see me ramble on about, feel free to leave a comment asking me to do so.