Monday, August 8, 2016

I'm reviewing data structures and come graph algorithms using Stanford's CS106X

A few weeks ago, I wanted to be able to solve some problems on UVA Online Judge that requires some knowledge of graph algorithms. So I thought of trying to do again the assignments for Stanford's CS106B that I did last 2011.

The problem was that the assignment files that I have requires Visual Studio 2005. I tried to find ways to make it work on VS 2015 but I failed.

So I went to the latest CS106B website to download their latest assignment files (maybe they are using Visual Studio 2015 now?).

... Toinks! I needed to login to download the files. But I'm not a Stanford student! So I was not able to download the files.

Luckily, I found the latest website of CS106X and the files are downloadable. I thought to myself that the problems for CS106X might be more difficult than CS106B's but I think I can be able to do this now because I already experienced solving problems similar to these before.

The handout on the Course Information says that uploading my code to GitHub is a violation to the Honor Code...

The following four activities are among the many considered to be Honor Code violations in this course:
1. Looking at another student's code.
2. Showing another student your code, or making your code public so that it's searchable and easily discovered online or elsewhere.
3. Discussing assignments in such detail that you duplicate a portion of someone else's code in your own program.
4. Uploading your code to a public repository (e.g. or so that others can easily discover it via word of mouth or search engines. If you'd like to upload your code to a private repository, you can do so on bitbucket or some other hosting service that provides free-of-charge private hosting.

... so I'm not going to put my code on GitHub or anywhere where anyone can download it. (I placed my solutions online last 2011 when I did CS106B but I already removed them.)

What I'm going to do instead is to put screenshots and the finished executable files of my solutions online just to give proof that I solved the exercises.

You can see the screenshots and executable files of my solutions on my GitHub.

Here is the screenshot of the first problem that I did:

Thursday, August 4, 2016

An easy to read Discrete Math book, I hope :)

I found a book which I believe can help me begin to study Discrete Mathematics and other parts of theoretical computer science: the Building Blocks of Theoretical Computer Science by Margaret M. Fleck.

I found the book from a list of books on Github.

I became interested with the book because the preface says "Everyone can do proofs".

And then says this:
"Some of you are brilliant young theoreticians and you’ll think this stuff is fun because it’s what you naturally like to do. However, many of you are future software and hardware engineers. Some of you may never think of formal mathematics as “fun.” That’s ok. We understand. We’re hoping to give you a sense of why it’s pretty and useful, and enough fluency with it to communicate with the theoretical side of the field."
I'm happy that there are math people out there who are considerate to programmers like me who do not have a very rich math background... and they are doing something to make it easier for us to understand that things that they understand!!! Wow!

I actually do think that formal mathematics is fun. I just don't understand them now.

I hope this book will help get me started in studying the more complex parts of computer science.

Another thing is that, a few days ago, I actually found another interesting book that I believe is similar to the one above: "Mathematical Foundations of Computing" by Keith Schwarz. It is a course reader of Stanford's CS 103 last Winter 2016.

What made me become interested to this one is the statement in the Course Information about prerequisites:
"CS103 is a theory course, but doesn't have any math prerequisites. You should feel comfortable with high-school algebra (i.e. factoring and multiplying polynomials), but you do not need to have taken precalculus or calculus prior to taking CS103. We'll build up all the mathematical machinery we need as we go."
I thought I need calculus when studying discrete math. Well, maybe it is needed in more advanced discrete math? I don't know.

But I will first use "Building Blocks of Theoretical Computer Science" then the second book, "Mathematical Foundations of Computing".

Happy coding!! I mean, mathematicking :D :D

Here's an inspiring video that I got from the webpage of Stanford's CS 103 last Winter 2016:

She says, "Math is hard. But you can do it."


The Angular 2 "Tour of Heroes" tutorial has a missing part

I think there is something missing in the "Routing" part of the "Tour of Heroes" tutorial -- after the "Make the router available" section and before the "Router Links" section.

The <router-outlet> needs "directives: [ROUTER_DIRECTIVES]". But the code for that is given way below of the tutorial.

I got confused. But I was able to see the error and found a fix for it.

Maybe you got confused also.

Here is the link to what I think should be placed in that missing part. I'm not a native English speaker so my English might not be 100% correct but I believe you can be able to understand it.

Happy coding!

Tuesday, August 2, 2016

Is it ok to write "selfish" blog posts?


By "sefish" I don't really mean this:
Concerned chiefly or only with yourself and your advantage to the exclusion of others - from Wordweb
I used that word just to get your attention. :)

What I really mean to say is this: "Is it okay to write blog posts which might seem selfish?" or "Is it okay to write blog posts about yourself and what you are currently doing, and the problems you encountered in, for example, programming?"

Well, Vaughn Vernon has this to say to the question "Do you have any recommendations for newbie blog writers?" in the comments section of one of his articles:
"Write about what you are doing. When you face a tough problem in your work then you find a breakthrough, it’s probably something others will face. Blog about it." - Vaughn Vernon
I think I also encountered statements like that from John Sonmez's blog

I will try to update this post with similar statements from other people in the future.

(Actually I have this kind of thought many years ago that these "selfish" blog post might be useful in the future if people will study something related to past events and predicting future events. But maybe it's just an imagination that will never happen :D )