Wednesday, December 10, 2014

Algorithms on Khan Academy

Khan Academy recently announced they published an introductory module on Algorithms. While I am waiting for the "Principle of Computing" and "Algorithmic Thinking" classes on Coursera to come around again, I thought this would make a nice preparation step. I am just under halfway through with the module.

What is great:
This is a very nice introduction to algorithms. While I don't feel like I could walk into a job interview and code these from scratch, I do feel like for every one of the algos covered so far, I can give a solid description and pseudo-code to describe how they work in general.
I also liked the structure of the algorithm sections: introduce the algorithm, give a part of the implementation, and then the rest of the implementation, and finally analyze the efficiency of the algorithm.

Not so great:
The implementation sections have an specific, expected solution and gives "hints" to this solution. You won't get credit for a solution - even if all of your tests pass - until you match exactly what they "hint" at. Personally, I would find it more effective if they accepted a working solution then guided us to a more elegant solution. Moreover, there are instances in which my code matches the hint, but I am still not getting credit for it. It is just unclear if I need to do more or if there is a bug. In these cases, I wish the algorithms section was more like the rest of KA, in that there are multiple hints that increase in their help.
I also thought the section on asymptotic notation could have been clearer. I would get the right answers on the quizzes, but I wasn't always sure why that was the right answer.

Overall, this is a really good introduction. I think after working through this, a novice like me will be able to better tackle some of the more advanced algorithms courses on Udacity or Coursera and have a nice little head start.

Saturday, October 25, 2014

Learning to Develop Software Progress

I have made some pretty good progress in several areas of learning how to do this software development thing.

Discrete Math Continuing to work through Discrete Maths text book. I am almost finished with Chapter 5: Sequences. Turns out I really like summations. We have gotten to defining sequences recursively, which would have been good background to have in Principles of Computing. Connecting the dots in this way makes me glad I am taking the time to do this.

Work Tasks I have done two coding pieces recently at the J-O-B. I wrote a visualizer in Ruby that uses base class inheritance to organize our ontology, rather than the current organization by domains, which are just general areas of knowledge. Using domains like 'sports', 'cricket', 'engineering', and 'physics' is a pretty unintuitive means to browse a hierarchy. There is no consistent level, and knowing one has to look in the 'time' domain for the broadest concept of 'event' in our ontology is non-obvious, particularly when there is an 'event' domain!! It was really good to see how flat our hierarchy is and identify where we can add in some levels to make a more cohesive and browsable ontology.

I also started learning the Visual Studio IDE and C# language. I have written several small methods to help with a data on-boarding task I currently have. It is a nice way to ease into the language. It makes me realize how much there is to learn, though. I had to use our internal JSON paring library and create a dictionary to assign the appropriate language given a data source provider. Good stuff.

Self-Project I finally came up with a project idea and have a pretty reasonable scope! The idea isn't earth-shatteringly interesting or unique, but I like it and will be able to see it through.
I just started to put together the prototype design document, but it is an interesting little project that will require accessing or storing data, manipulating it into a given format, and then creating a mobile app to serve it up on mobile devices. I think mobile is the best platform for what I want to do, plus it is good skill expansion.

Saturday, September 6, 2014

1/4 of the way through Discrete Mathematics

I got my hands on a copy of Discrete Mathematics with Applications. Half-Price Books for the win! It does help to be two blocks away from the HPB closest to the university.
So far, it has been mostly review for me. These first three chapters are mostly logic. I do approve of the emphasis, though. Next up, we start number theory, and I am looking forward to that. I am really hoping to finish this up before the next Principles of Computing class comes around. It would be so awesome to work on it again with this under my belt.
I should have my work review this upcoming week, and I am hoping to leave with a plan to get some coding work. I do write scripts for my own use, but having a feature task and going through the process of review and having code in production would be so fantastic.

Tuesday, July 29, 2014

Principles of Computing - Abandoned

I dropped the PoC class. I just came to the realization that I really needed to bone up on Discrete Mathematics before going any further in Computer Science. I found myself increasingly out of time every week, and cutting the math-heavy homework to focus on the mini-project. I'd rather be able to do both and really deeply understand the material than just trying to scrape a decent grade.

I really liked the idea of using the MIT courses, but without a set of answers to the problem sets, it is not clear to me how useful it is. It seems like such a good course too. The recitations and the exams *do* have solutions posted. Perhaps I can find exercises to fill in the gaps.

This seems to be my only option, as Coursera doesn't appear to have anything that will fill my needs any time soon. Doing a quick search isn't turning up any alternatives of the same caliber of the MIT course. Bleh. What is frustrating is that there does appear to be a site with links to solutions, but all password-protected. Rats.

This site had some suggestions ofr courses as well as books. I thought this Discrete Mathematics Book by Epp looked promising, but for $200, I'm going to have to think seriously. Amazon does allow for rentals. Maybe there is a cheap version from the library? The other books in pdf on this site needed Haskell. Not sure I want a programming and mathematics combination.

Hm. It was a lot easier at university. Classes were pre-determined, and all anyone had to do was sign up, pay the crap load of money for the class and books and fees, and then make it through. Piece of cake :)

Saturday, July 19, 2014

Two Weeks Left in "Principles of Computing"

I managed last week with data structures and inheritance swimmingly. These two are right up my ontologist's alley. This week's recursion topic is a mind-bender, but I am wading through it. I still struggle with the more math-heavy aspects of the class, though.

There are two parts to the class besides the material: homework and mini-projects. The homework is more a quiz-style format. There are approx. 10-12 multiple choice questions. I have found that these questions are extremely hard for me to grok, and almost always math-heavy. The mini-projects are the actual coding tasks. They include things like simulations of zombie apocalypse, recreating the 2048 game, and word wrangler.

Usually, I need the week to watch the videos and work through the math/coding notes and do the practice activities. I prefer to start the mini-project by Sat to have both days of the weekend to work on it. There isn't much time in there for the hours I would need to finish the homework, so I usually drop it, or make one attempt and then leave my crappy score. There is a very real disparity between how well I can do on the homework and how I do on the mini-projects. I pull a 100% on the mini-projects every time.

It is really unclear to me how much emphasis I should be placing on the fact that I am throwing homework under the bus. I am not too worried about the number grade I get for the class; I am more interested in gaining the knowledge. That said, it still isn't clear to me how much I am leaving at the table by not dropping the class now and switching to a discrete math class, and later returning when I have a better handle.

Even though there is a follow-on class in Algorithms, I am thinking that I will wrap up this Principles of Computing class, then switch to a discrete maths class. Once I have that, I will pick up an Algorithms class. Luckily, Coursera has two: an algorithmic thinking class that is part of this series, and another two-part course done in Java. If I can catch the two-part one in Java, that might be a better choice: more in depth and exposure to Java.

Saturday, July 5, 2014

Halfway Through Principles of Computing

So I am at the halfway point in the class, and seriously thinking of bailing. These last weeks of probability, randomness, and combinatorics have really put the pressure on me. I don't think necessarily the class is the problem. Rather, the problem is the lack of a discrete math background and the lack of sufficient spare time to make up for it. I did intend to work through a Discrete Math course, but I was waiting until this series was done. In retrospect, I think it would have been better to do the Math first :).

So, these past two weeks have been kicking my learning-to-program butt. I was thinking I should pull out and isolate work on the maths. I can always return to the programming after I have a handle on the maths. I found a couple of books to start creating a lesson plan, and I checked out the syllabus for my programming class to make sure I cover all of the relevant topics. To my surprise, this looks like the last week focusing on maths!! Instead, next week we move onto data types and inheritance. Oh definitely more up my alley.

My current plan is to stick with the class one more week and see if there are still big gaping holes to fill. I can always back out next week. I'd really hate to lose momentum in this series. I finished this week's mini-project with a perfect score, and if I can at least pass the homework, I think it will be fine.

Sunday, May 4, 2014

Temporarily Discouraged, but working on solutions

I am having motivation problems in my class. I managed to finish the mini-project for last week, get through the week's videos, do one of the sets of practice exercises, do the evaluations for the mini-project, and one of the quizzes this weekend. I still need to finish the second set of practice exercises, take that quiz, and then finish this week's mini-project.

This is the week we switched from scripting-type programs to OOP. It is a bit of a change for me. I didn't find it as frustrating as animation, but it still took some work to remember how it is different. I am glad we are making the change, because I don't do much OOP when I am writing my scripts for work. I should just make myself do it, but I am usually more focused on getting what I need done rather than how I am getting it done.

I did suspect that I would have a motivation problem when mostly through the class. Why is it the closer I get to the finish line, the harder it is to keep on? I mean, you'd think that seeing how little remains would be so motivating, but instead, it feels like I have just done too much already. SO, knowing all that about myself, I have promised myself a new e-book for every mini-project I complete. I hate doing the evaluations, so I usually do those while savoring a hot cup of tea and eating a bit of chocolate. I have also promised myself that if I complete the course and gain a certificate, I'll give myself a nice pedicure. Not one of the cheaper ones, but one of the nicer, more expensive ones. I am so hoping this propels me to finish!!

For me, the other difficulty is that exercise plays a huge role in my ability to stay positive and work better, and that is one thing that has been slipping of late. Mostly because my preference is a tap dance class I take, and I just haven't been able to get to the classes and keep up with the full-time work and the programming class, and the little matter of a family and home. Oh well, it is what it is. I made a point to do my own little yoga session on Sat., and I will need to come up with something. Maybe I can walk a bit longer to the bus in the morning? Instead of a mile walk, turn it into a mile and a half?

Sunday, April 27, 2014

About Halfway Through Intro Programming

We are hitting week 5 in the Coursera class I am taking. We just finished the pong game. I was a little disappointed that I did not seem to fix one of the scoring issues I had noted. I really thought I had it fixed, but no. Pong was quite a jump in complexity from the previous mini-projects that are due weekly. I had to scramble a bit more than usual to finish the work.

Python is a fine little language, but I still prefer Ruby for some reason. The Python's usage of the whitespace annoys me. But over all, they are pretty similar scripting languages. Kind of six of one... as far as I am concerned.

I think most of the value for me has been in the UI bits of the class, especially the animation. It isn't something that really comes up when one is trying to, say, find the number of politicians in a data set without an end date to their terms in office, or the number of entities that are typed as people and organizations :) Just generate a list and Bob's your uncle. While I like the expansion of my tool set, it isn't overly interesting enough to me to make me want to do UI or client-side programming. Good to know!

Sunday, April 6, 2014

More Programming Updates

I attempted the Algorithms class on Coursera, and it was a bit too much of a reach. I think if I could have devoted more time, I could have made it work. However, with a full-time+ job and a family, it just was too much. That said, I cannot wait to be in a better position to work through the content. I bought the text, and I have all of the class lectures and assignments. My plan is to circle back, maybe late in the year.

Instead, I started on the three courses from Rice offered on Coursera. The beginning one is fairly easily. I probably could have skipped it, but I had concerns there might be something I would miss, *and* the class projects are all game based: Paper, Scissor, Rock, Lizard, Spock was the first. At some point we'll do Pong.

The other classes cover a Principles of Computing course, and then an Algorithmic Thinking course. Those are the two I am really looking forward to, since that is where I feel like my skill set is currently needing help.

I am still mulling my own kinds of projects that will be a solid demonstration of skills. I am also a bit nervous about the whole idea of changing careers, and wondering if I am just playing some massive joke on myself :) For the most part, though, I concentrate on the steps before me, rather than the mountain looming.

Tuesday, January 14, 2014

Java Programming

Currently, I am taking some time to beef up on my Java. I took a class in once when I still lived in Austin, something like 8 years ago. I only managed to accomplish one working app in the language, so I am very fuzzy on it.

Why some Java? The data algorithms class that starts at the end of the month is in Java. Handily, the course instructors have an intro to programming class in Java. So t is easy to walk through the exercises.

I have a longer post about the work I did over the holiday and the re-do of a web site we have. Also, we bought a machine to be our server and installed Ubuntu. Our plan is to host our website for C's business and host whatever portfolio pieces I want, and maybe make it part entertainment machine: storing movies and shows more easily connect to Amazon Prime viewing and the like.

Short Update and Task Idea

1/14/14
Not much coding today. Still have much hatred in my heart for the quadratic formula. I mean really, if someone gave me this piece of code:

public class Quadratic {

    public static void main(String[] args) {
        double b = Double.parseDouble(args[0]);
        double c = Double.parseDouble(args[1]);

        double discriminant = b*b - 4.0*c;
        double sqroot =  Math.sqrt(discriminant);

        double root1 = (-b + sqroot) / 2.0;
        double root2 = (-b - sqroot) / 2.0;

        System.out.println(root1);
        System.out.println(root2);
    }
}

Then, told me to “an appropriate error message if the discriminant is negative, and behaves appropriately (avoiding division by zero) if a is zero.” I would do this:

public class Quadratic {

    public static void main(String[] args) {
        double b = Double.parseDouble(args[0]);
        double c = Double.parseDouble(args[1]);

        double discriminant = b*b - 4.0*c;
       
        if (discriminant > 1) System.out.println("Discriminant is a negative number");
        else
        {
          double sqroot =  Math.sqrt(discriminant);

          double root1 = (-b + sqroot) / 2.0;
          double root2 = (-b - sqroot) / 2.0;

          System.out.println(root1);
          System.out.println(root2);
        }
    }
}

Then, tell them there is no “a” and that the only division in this code is by 2.0, which means there is no cases possible of division by zero. Is that so wrong?

Other programming task ideas: programming a widget that tracks how many hours I spend programming.

Wednesday, January 1, 2014

Career Decisions II: The Game Plan

If I am going to indeed change careers, I need a plan. A combination of books and Coursera classes will fill out gaps in my knowledge.

Since knowledge without application is useless, I am hoping to have a implementation or deliverable piece for each section. For example, after I have finished the HTML/CSS, I plan to re-do a website. I don't know how feasible it is to have one for each section, though, since for some things like the Data Structures section, it would not be clear to me what the deliverable piece would be. Perhaps since that section is handled by a class, it isn't quite so imperative to have a deliverable?

Knowledge

Here are the sections I am currently covering:
HTML/CSS
I picked up "Head First HTML" and am working through it.
Deliverable: website redo. C's website is one we quickly put together. It would be fun to walk through a redo and make it work better for them.

Javascript/JQuery
I'll probably work through a boo for this one.
Deliverable: Undecided

Data Structures I & II
Coursera is holding both of these soon. The first at the end of the month and the second in March. I am already signed up for both of them.
Deliverable: Course completion

Java and/or C#
Java will be used in the Data Structures class, so maybe I will go with C#. That will be really useful given my current company.
Deliverable: Undecided

I am sure this list will change over time.

Implementation

I have some ideas about longer term projects to work on to help build my skills. It would be great to find an open source project to contribute to, but how to actually go about that isn't clear to me. To me, it is the equivalent of walking into an operating room and asking if anyone needs a hand.

Alternatively, I have thought about setting up a server and creating different versions of blackjack that would use different programming languages and frameworks. For example, one blackjack game would be coded in Python using Django, and another version would be coded in Ruby using Rails. I like this because the challenge stays static and allows me to compare the different languages and frameworks.

Finally, I have always wanted to create a timeline of historical events that would allow me to compare events in different locations. For example, when the Normans were invading England, what was happening in China? I am investigating this project - more to come.