I Quit Platzi. Here is why.

So, I finally decided to cancel, or rather pause my platzi subscription for the longest period of time they allow –3 months. In case you don’t know what platzi is, it is a mostly-Spanish learning platform that tries to be the leading learning platform for the Hispanic world in the tech industry. And they really try to do it. The key word there being “try”.

So, what is wrong with it? In my particular case I am what is wrong. I’m too picky; it’s easy for small things to bother me more than they should. I’m a really hard judge. But mostly because I have years of experience programming. I’m not their target audience.

I don’t pretend to know EVERYTHING they teach. That would be absurd given how they cover a large range of topics. But to be honest, the things they teach that I don’t know are the things I’m not interested on at the moment, otherwise I would have learned them by now as well.

I find their classes to be basic introductions that never really dive deep in any topic. Their professional courses teach how to do things, not the theory behind that how. That is to say, they don’t really tell you why, only how. In my experience, and given my somewhat obsessive personality, the why is just as important if not more than the how. Theory matters.

I don’t meant to say platzi is a bad option. It may really be the best option for the Spanish-speaking world. This reflects either that I don’t know how to recognize a good thing when I see it, or that there is a lack of higher quality competitors that keep pushing the boundary of what is considered a good option. I think it is the latter.

When I first started my subscription I was excited. I took a couple of great courses that kept the hype high, but as time progressed and I took more courses I started to realize that newer courses seem to be made in a hurry just for the sake of expanding their library of content; it was quite disappointing to see courses that could easily be replaced by reading a man page.

So, is platzi really that bad? NO. Introductory courses are not a bad thing, they are a necessity, and there is only so much you can cover in a single course. Platzi’s job is not to please my peculiar taste for advanced higher education in very specific topics. Their job is to introduce the tech world to people so they can aspire to a better life through well paid jobs in the industry. And they are doing it. There is a plethora of testimonies from people who have better their lives thanks to what platzi has to offer. And that is their mission. They are nailing it.

I can recognize the value in being able to access a large array of courses covering a variety of topics in design, engineering, economics, and personal growth. I would definitely recommend platzi to some people, but not to all people. I myself will continue to be a sporadic student there. But for now, I have better learning resources that I want to explore.

The Asterisk Next to the Filename in Vim’s Netrw

Yesterday I was opening up a file, but since I didn’t quite remember the name of it, I decided to instead open the containing directory in Vim:

:vsp ../dir-name

This worked as expected, opening the file browser, which I learned is called Netrw. However, I noticed that one of the files had an asterisk next to its name:


I immediately started to wonder what that was about, but a quick search on duckduckgo.com produced no satisfactory results, so I hit F1 in vim, and the help page came up. Then I searched for *


which, of course, started to find a lot of asterisks because it seems vim uses them a lot in the help pages, but at some point I finally came to a section that explains that

“The |getftype()| function is used to append a bit of filigree to indicate filetype to locally listed files:”

Those indicators are as follows:

directory : /
executable : *
fifo : |
links : @
sockets : =

So there you have it; an asterisk next to a filename in Netrw means the file is executable.

The Netrw man page seems to be full of really nice information, so I now owe it to myself to give it a good read. You should too if you are into Vim.

Fixing MySQL Corrupt Table “ERROR 2013 (HY000): Lost connection to MySQL server during query”

Today I tried to drop a database in mysql


Which resulted in a error: “ERROR 2013 (HY000): Lost connection to MySQL server during query”. At that point everything started to go wrong, to the point where the MySQL server went completely down and I was unable to run it again. In short this is how things happened:

  1. Try to drop the database, which resulted in an error
  2. Keep trying to drop it, which resulted in the same error.
  3. Try increasing the net_read_timeout and net_write_timeout on the server, as well as –connect-timeout in the mysql client. No luck.
  4. Search the web, find no useful advice, but found a possible reason “data corruption”
  5. Try to recover data with a backup of the database from the production server. Shit went dow!
  6. The server stopped and refuse to start again. Following the instructions in the stop error lead me to new search terms.
  7. We have a new problem now, do more web searching.
  8. Find a useful page which recommended disabling innodb, and setting myisam as the default database engine.
  9. After doing that, the server worked, but trying to dump the database resulted in an error: ERROR 1010 (HY000): Error dropping database (can’t rmdir ‘./db_name’, errno: 39 “Directory not empty”)
  10. I decided to manually remove the directory, which removed the database.
  11. Create the database again and use the backup to restore it.
  12. Got an error saying that the table ‘table’ already existed. ‘table’ is the first table that the backup file tries to create.
  13. Try to dump the database, but got the same error as in #9.
  14. Manually delete the database again, Create it and the do a proper DROP.
  15. Create the database again and restore from backup. It worked!

I read a few pages during this problem, and found these useful:

SOLVED: InnoDB Error: space header page consists of zero bytes: xampp

MySQL: Error dropping database (errno 13; errno 17; errno 39)

Stepping into C++

When I started programming a few years ago, my first language was Javascript. Javascript has grown over the years, and it is now one of the most popular languages both, in the server, and in the client. I think the fact that it runs on both ends is part of what makes it powerful, since you can develop entire applications with it. When adobe release air, Javascript developers got the opportunity to build desktop applications, and we saw some popular ones, like earlier version of the twitter desktop client. Now we have even more frameworks such as CEF, and node-webkit, that allow us to continue developing native applications with Javascript. One thing that really got me interested in node-webkit is the fact that the framework can be embedded with the application, which makes it easier for users to install them since they don’t need to bother with the annoyance of having to install the framework themselves. Interestingly enough, node-webkit comes with a full instance of node.js, which should give you an idea of what kind of applications you can build with them. Having the power of an event loop in the desktop is one of the greatest things we’ve seen recently. So, with all this options available, Is it still worth learning C++ or even C?

Every language you learn gives you a new perspective, and makes you a better programmer. It also opens the doors to new communities, new people, new ideas, and new ways of doing things. There are certain patters that are popular in some languages, but not in others, and you will never get to know and understand them if you don’t learn those other languages. For these, and many other reasons, I think it is worth learning any language. I learned python, not because I wanted to start building python applications, but because I wanted to see what I could bring from python to my current development stack. Most of what I can do in python, I would be able to do in PHP, or even in javascript, but the point was not to be able to do new things, but to be able to continue learning experimenting, and most of all, to be able to read python, because we all know that reading code is one of the best ways to really learn how to code.

But why C++? C++ is just the language that I have the opportunity to learn at college right now. There is really no other reason than that.

The Course of Action

I will be using a few resources, at least for my first steps into C++. One of them is a series of videos from the CSIT 139 class at LACC. I’m not really sure if I can share this list, so for now I won’t. The second resource I will be using is the C++ tutorial at cplusplus.com. I already started with this tutorial and it really seems to be a great introduction. Another great introduction to the language is the white paper Linux Programming and C++, by Mario Giannini. I will also be using another introduction to C++ tutorial written by Alex Allain, and finally, I will be attending a small study group organized by one of the professors from the CSIT department and Los Angeles City College. It should be assumed as well, that I will be reading other material and C++ articles as I progress, but my main resources will be the ones outlined here.

How I Will Be Reading them.

I will be following the tutorials closely together trying to stay in the same topics at the same time, or at least at the same level. This will help me avoid that problem of finishing one tutorial, and then having to start with the next one from the basics all over again. If you will be reading this materials as well, I recommend you read the Linux Programming and C++ white paper first or at least to finish reading it along with the first chapter of the other tutorials. There is a second part to that white paper located at http://www.codefighter.com/linux2.html that deals with sockets. You can leave that for latter when you’ve read the other tutorials at least past the middle point.

The Good the Bad and the Ugly

This is a completely different way for learning a language than how I’ve learned other languages in the past, mainly because there is a study group.

One of the good things of learning by your self is the opportunity to learn at your own pace. Whether you are a fast learner, or you have a hard time learning new things, when you learn on your own there is no pressure to keep up with the group, or to slow down for the sake of the group. However, if you are one of the fast learners, you can help, encourage, and have an impact on those who learn a bit slower, and help them learn faster, and understand concepts better. If you are on the slow end, you have motivation, and you have people who can help you get through the difficult parts. Something particularly good in this case, is that we have an actual professor, who not only organized this group, but who also approached us personally to invite us to be part of it. A professor who shows this kind of commitment may very well be the most important part for many in this group. Without him, many would not venture into learning C++.

One of the bad things is going to be the waiting. Most of the people who will be in this group have little knowledge of programming. In less than a night I can go from 0 to to being able to write functioning programs in C++ due to my background in programming, but they can’t. This can turn things boring at times.

My background helps me understand concepts easily, but without a good foundation in programming, some people can have a hard time understanding even basic concepts. Douglas Crockford says that it takes a certain kind of crazy person to program, and I think it is true. Unfortunately, not all of us are that crazy. The ones who are, go and become good programmers, then ones who aren’t get stock forever in the most basic things, unable to get into the mindset that is required for programming. In this group, however, I think there will be real talent, and that should help us move forward faster than in a regular class.

The ugly for many will be the fact that the programs we will learn to write are console programs. However, any good linux user knows the real beauty in that beast. I think some of the most powerful tools I use are command line based, but that is in the linux world. I’m sure the windows world is different.

The Platform

In the group, we will be using Visual Studio and Windows, but on my own, I will be using Linux, and the G++ compiler. As always, my editor of choice is Vim, and I may write a few shell scripts where I see fit, but for now I haven’t seen the need for that.

Wrapping Up

I’ve already written my first hello world program in C++, and a little program that handles input from the user. I think that for the other people in the group one of the things that will get them is the syntax since many of them only have a Visual Basic background. I still catch myself writing semicolons at the end of python statements sometimes. For them it may be the opposite –forgetting the semicolons at the end of C++ statements. I think it will be a nice experience to learn a new language along with other people, and to see how their learning process is, and how hard the learning curve is for people with little programming background. My role in the group, I think, will be mainly helping others, since I have deeper understanding of programming in general, and am very familiar with the C family of languages.