Showing posts with label structure. Show all posts
Showing posts with label structure. 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, April 14, 2014

Workshopping with Homeschoolers

            Last Monday I had a delightful experience. My wife and I taught a chainmaille workshop for a homeschooling group.

            When I was first asked to run this workshop, I asked the mother who’d suggested the idea to have the kids look through my website to pick projects they’d like to learn. The reply I got was that they wanted to learn the techniques and be allowed to make what they wanted after that.

            This, in itself, was a bit of a challenge, since it’s hard to plan for such an unstructured lesson – particularly for materials. However, I also understood the benefit of allowing the children free reign with what they created.

            So I went and I taught a group of eight (including one of the mothers and the curator of the museum we were at) the basics, then stuck around to teach more to those who wanted to learn more patterns and help the others with what they were making on their own. It was a wonderful time – it felt like I was there having fun with a group of friends. It was also great to teach people so eager to learn.

            What impressed me most, however, was the only member of the group who didn't really take to the craft. He struggled with the pattern, but still gave it a good try. Instead of throwing a fit, like many kids his age would (and I could see the emotions that would accompany that written on his face), he tried his best and gave up when it became too frustrating.

            In response to this, where many mothers would scold him and tell him to keep trying, his mother thanked him for giving it a try and doing his best and gave no objection to him returning to playing with Lego (what they’d been doing before the workshop).

            I think this demonstrates one of the major advantages to homeschooling – there is a much greater level of respect and understanding between the parents and their children, since they spend so much more time together. Children are also encouraged to learn and ask questions, but not forced to learn if they don’t want to, which makes them more willing to learn. They even enjoy it! Whereas children in the school system usually rebel and take a great dislike for learning.

            I wonder if there is something our educational system can learn from this. Perhaps there’s away to teach children in large groups while respecting who they are instead of trying to change them to fit the system. It might even make a friendlier society at large.


            Oh, did I mention how polite homeschooled children are? At the end of the workshop, that same boy who had trouble learning made a point of coming up to me and thanking me for coming to teach. I'm looking forward to my next workshop with the group very much.




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.