Category Archives: Development

The Idea of Locking Programs

There have been several times during the application development phase where my clients have decided to back out on payments or abandon projects all together. During this time, they usually have a working copy of the application that I have worked on for the past few months. When this occurs, what is the right thing to do?

Is it acceptable to lock the user out of their program simply because they missed a payment or chose not to continue with the mutual agreement of the software? If it is not acceptable to lock out the user, is it acceptable to disable certain features since they did not follow through with their end of the agreement?

I think these problems fall under the category of software politics. These are the same politics that involve problems such as “Should software be free?” “Should all code be free?” “Is the commercialization of software beneficial to the industry?”. Usually, I avoid software politics except when it comes to crediting the software authors, which I do not have a hard time supporting.

I believe that the problem at hand, although it is indeed a software politics problem, it is also a problem of a voided agreement. The purchaser of the software agreed to follow through with payments or whatever else may be at stake. Thus, since they did not follow through, the software developer (being the owner of the software) has the right to do whatever they want to the software to deny or allow access.

Thus, I believe that it is perfectly acceptable to lock the client out of the software entirely. In fact, that is exactly the process that I have followed. Usually I implement this by reading an online text file that contains a boolean allowing or denying any user access. This text file is usually read when the program starts up.

Of course, this is a little inconvenient, as it requires the user to have internet access in order to actually access the meat of the program. This is something that I don’t really endorse, especially when it  comes to the gaming industry.

But I digress. In order to avoid this problem, I think that it is only right to still allow the user into the program if they don’t have internet access. Thus, the lockout check may be avoided by simply flipping the switch on the internet connection.

But there is a caveat to all of this: updates. When the user does not have an internet connection when launching the program, the program cannot check for updates. Thus, this small workaround leaves the user running an older version of their software. Although this may not be a problem, the user will have to deal with bugs that exist due to older versions of the code and a lack of features that come along with the newer versions.

Since I feel that locking the user out from their own software is justified, I think that I will publish a .NET library to do just this pretty soon. Since a separate .NET library would require an extra GET request from the internet, I think that it would be best to integrate this lockout library and the update library (update.net currently) in order to make a single, streamlined call to get information from the internet.

So, be on the lookout for that!

The Change to Open Source

When I first started programming around six years ago, I held a huge belief that all the code that I created was mine. Everything that I compiled was mine. Everything that I made was mine. All of this stuff was to be maintained, distributed, and advertised by me. Everything was mine. Recently, however, this attitude has changed.

After installing Linux on my laptop and using it exclusively for the past year, I have come to love the world of open-source. It’s a beautiful place. It’s a world of free software, free code, and a very, very friendly and helpful community. Something doesn’t work in your software? Why not take a look at the code, edit it until it works, and then submit the changes to help others around the world? It’s a really, really beautiful system. It’s also a system that I really want to be a part of.

Because of this, I have started uploading most of my projects to GitHub. Now, anyone who is interested in the projects that I am working on can download my code, fix my bugs, and publish it to the world. What’s the reward for doing this? In my opinion, besides personal satisfaction, it’s the fame.

There’s a great feeling behind having your name on code. You start to become widely known throughout the coding community and your contributions on projects start to become valued. People get excited to have your code in their projects. On top of that feeling, it’s simply awesome to have a huge list of projects that you’ve contributed to.

What about the money, though? What about the commercialization of software? Well to that I have a very interesting relationship. I feel that if your code is so groundbreaking and so revolutionary that it can make you a large sum of money, go ahead and privatize it. However, if this revolutionary code would be of benefit to other projects around the world, I am under the strong opinion that the code should be open-sourced. This allows everyone to use this new ideas in their own projects, benefitting the entire computer science community as a whole.

However, there are problems with this. A prime example of these problems is Gabriel Cirulli’s 2048 . After a post on hacker news, Cirulli’s game became extremely popular. The game, being open source, spawned several hackers who wanted to figure out how to solve the game. Soon enough, 2048 AI, exploits, glitches, and tricks were all exposed. There is no problem with this. The problem is due to the popularity of the game. Because of the popularity, a few people took the source code of the game and ported it to mobile platforms, which many people downloaded. Instead of retaining credit to Gabriel, however, these programmers decided to take the credit and put ads into the game, capturing large amounts of revenue for themselves as unknowing mobile users downloaded these copies of the game.

If we want the open-source world to flourish, we must not allow events like the 2048 disaster to occur. There must be an unsigned agreement among programmers about the ownership of code. Although people can edit it in any way they want, people should give credit where it is due. Since the aspect of code-fame is one of the most appealing things about open-source, I think that the disrespect of ownership is our primary problem with open-source code. I believe this is what is preventing us from moving forward.

In order to show my support for open-source, however, I plan on open-sourcing most of my projects from here on out. This can be seen with my recent GitHub additions update.net and SQLiteDatabaseManager – Both of these projects originated as supporting libraries for an application that I am making for a client. I figured that it would be in everyone’s best interest if these small supporting libraries are open-sourced. The idea is simple. I open-source the libraries, other people may use them. Other people fix any bugs in the library, my client benefits since they will always be getting the latest versions of the libraries.

I really hope to see the open-source movement only gain more popularity as time goes on.

Taking Notes in Class

To clear up any confusion before anyone begins to read this post, I am a Computer Science Major at University of California, San Diego. I run Linux as my primary operating system.

As I go from class to class, I often ponder upon the most efficient and effective way to take notes. Why do I ponder this? Because every time I forget something I wish that I could just use a computer function to scan all of my handwritten notes for certain keywords. But I can’t for several reasons.

  1. My handwritten notes are not on a computer
  2. Manually scanning pages of my handwritten notes into a PDF file would take decades
  3. No computer handwriting recognition system can recognize my handwriting.

Because of these three factors, I often ponder upon taking notes on an electronic device; however, what happens when I want to draw pictures or draw fancy symbols or doodle? I can’t if I am not working on a tablet with a decent stylus – and I’m not. I am working on my trusty laptop. Usually, this is enough to convince me that I should just stick to buying a few nice notebooks and keeping all of my notes organized in them. However, next time I need to find something fast, I regret it, as I really want to CTRL+F my notes.

In order to solve this, I looked for a lightweight note editor program for my laptop that had basic organization and markup capabilities. I found ZIM, which is super handy for building a local version of Wikipedia for all topics that interest you. I used this program for a good 20 weeks. Everything worked great and I acquired a vast amount of notes in many subjects that covered a range of topics. The problem arose; however, when I wanted to use vim keystrokes.

Writing in ZIM is great, don’t get me wrong, but sometimes you just want to be able to write faster. You don’t have time to reach over to the enter key for a newline. You don’t have time to press end to get to the end of the line. You want something faster. In order to solve this, I gave up writing in ZIM’s editor and used vim instead. Of course, I acquainted myself with ZIM’s markup syntax so I could still read my notes from ZIM, but I no longer wanted to use their proprietary environment. Instead, I stuck with my handy-dandy vim.

All was well in my note-taking world. That is, until someone asked for a copy of my notes. They were a mess if you didn’t have ZIM installed. Markup syntax everywhere that made the file almost unreadable to the untrained eye. I needed someway to share this file with my friend while retaining the beauty of its marked up design. The closest markup language I found was Markdown, the internet standard for marking up documents.

I could write all of my notes in markdown and then save them to a GitHub repo and then everyone could access my notes all the time and I could edit them and then push the changes and then everything would be great. In fact, that’s exactly what I did. I setup a repo and began writing my notes in Markdown. The only problem was that I had no way of converting my old notes from ZIM to Markdown. Thus, zimdown was born.

zimdown is my own personal solution to converting ZIM markup files into Markdown. It is not complete, but it will allow me to continue writing my notes in ZIM markup, view them locally in ZIM, and convert them into markdown to push to my GitHub repo for public viewing. Sound like a pain? It probably will be.

Why do I write notes like this? All because I don’t want to let go of my precious vim and I don’t want to use a heavy solution like Evernote. I think it is worth it. What are your thoughts?