My Thoughts on the MIT license as an Open Source Student

After reading the  MIT license there are a couple of things I found interesting and intriguing. First of all it basically states that the software is free of charge which is great. In our time today software that is free and actually good (lots of ad filled/garbage free software) is harder to come by than people think. Yes there are a lot of open source projects and applications you can download but honestly I can’t even count with two hands the amount of times I’ve downloaded an application that was free to just immediately delete it because of either unreliability, design, or intrusive ads.

OSD 2

The MIT license is a bit different when it comes to “free.” CCleaner is a great free application that cleans up your computer but I can bet you anything that if you try to sell it you’ll be at least in some legal trouble (IANAL). Where the MIT license differs is it does actually allow you to sell that software or code even “as is” if you so desire. This is good in sense that it can allow someone to take something open source and make it better without limitations and potentially make a profit off of it. The license also states that the individual can copy, modify, merge, publish, and distribute without restriction which is great because words like “modify”, “distribute”, and “copy” are fundamental for open source. Open source is about collaboration, creation, and generally making things better with a team of people all around the world and the MIT license seems to be like the catalyst behind it all. Slap this license on anything you want to be open source and your good to go without any limitation or repercussion and especially without anyone coming back for a refund which brings me to my next finding.

“THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED…..” generally for open source this statement is great and is also interesting. If I download sqlite and ask for a refund or some kind of warranty I’ll get laughed at out the door because its free for anyone and open source. A perfect example was conveyed in class when Professor David Humphrey said that this happened to him yet his software was covered under the MIT license. I believe some company asked him for a refund or a fix because the software had a bug, however under the MIT license this nonsense is not applicable and is stated in all CAPS so its made clear to anyone wanting a refund or something back from the developer; “As is” is “as is” there is no better way to put it.

Advertisements

My Experience Building and Modifying Mozilla Firefox

For the last couple days it has been a roller coaster yet also a great rewarding learning experience. Building Firefox from essentially a directory of hundreds of files is no easy task and through doing so I learned that I don’t have most of the required libraries and tools needed to build such a browser.

The process works as follows:

  1. Get the latest Mozilla Build version from https://hg.mozilla.org/ (As of this post its 3.0)
  2. Install Mozilla Build to C:/mozilla-build
  3. From the same site https://hg.mozilla.org/ (which holds all the files Mozilla related). You need to download mozilla-central and unzip it to the path C:/mozilla-source/mozilla-cental/
  4. Now launch start-shell.bat from the mozilla-build directory cd to mozilla-central
  5. Set path PATH=$PATH:~/.cargo/bin and run the following commands
    1. mach bootstrap
    2. mach build
    3. mach run
  6. After these steps you SHOULD have a successful Mozilla Firefox build provided you have ALL the prerequisites and the REQUIRED environment variables created

OSD lab2 2

I listed this process and ripped it from Mozilla’s guide because by the look of it it seems super straight forward, however in reality its a completely different game. The amount of hours I spent fixing error after error was intense and very very tedious with multiple attempts of starting completely from scratch and even on different computers. With errors and debugging I consider myself fairly resilient and will exhaust every possibility so I fix whatever I’m working on however this project of building Firefox was something else which is why I also say it is a great learning experience and I am glad I got it working in the end.

First it started with simple errors like “you need this specific C++ library or the Windows 10 SDK.” That was all fine and good and I downloaded a couple gigabytes of libraries and required applications. Then it got to errors like you have to set “llvm_config” as a environment variable indicating llvm-config.exe not found. This is when the slippery slope of undocumented requirements and bugs started to manifest. In Mozilla’s own instruction they don’t indicate that you need to download LLVM/Clang so by doing research I found out how to get it off their website (LLVM) which is actually not the right way to get it because for some reason the only executable I need (llvm-config.exe) is NOT included in the download from that website. From this point began more research to find a build of LLVM that has llvm-config.exe so I can make a environment variable and continue with the Mozilla Build process which is just fix errors simulator. Eventually I found one (ClangOnWin) that contains my desired .exe and went on with the process. Through the rest of process there were more weird errors with certain paths not made and simple executables like makecab.exe not being seen by the Mozilla Build shell but it is seen by simple command prompt.

Then came the final error which I am 99.99% sure is a bug with the latest Mozilla Build because I tried two different computers from scratch and encountered the same error. The only workaround is to use some files from a previous Mozilla Build release which corrects the issue thus indicating that if ANYONE wants to build Mozilla on windows they will encountered a barely documented compiler issue. OSD lab2 3

To fix this you need to download Mozilla build 2.2.0 and copy the start-shell.bat and the start-shell-msvc2015.bat to your mozilla-build directory and then use start-shell-msvc2015.bat to build. So I did all of that and now have a working Firefox build that I modified to show that it is indeed working.

Here is what I modified:

  1. When you click open new window it will open a page showing random cat animated gifs OSD lab2 4
  2. Modified the top tab bar to show as orange by doing the following code edit to background: url(‘your-desired-image’);OSD lab2 1
  3. Tab color and font color modified to red and transparent greenishOSD lab2 6
  4. Modified browser.dtd to show menu options differently. Named “New Window” to “New Tindow” in the hope the cross between a tab and a window will catch on 😉 osd lab2 5

Overall though these are super simple code edits the hope is for this to lead to real world Mozilla Firefox bug work and possibly develop new improvements for the browser.

 

Introduction: Hello!

Hello and welcome to my blog. My name is Michael Pierre and as of 2017 I am a third year Computer Programming & Analysis student at Seneca College.michael pierre This is my last year of study with hope to get a full-time job in software development after graduation.

My favorite programming languages are Java, C#, and JavaScript with Java in particular being far above the others. I’ve been working with Java for around seven years now which far precedes any other languages I’ve learned. Not to say I don’t enjoy the other languages it just happens that most of the major projects I’ve working on have been in Java.

Besides coding I also like all aspects of computers and enjoy tinkering around in many different fields like networking, electrical, and hardware. In my spare time away from the computer I like to keep a healthy lifestyle by going to the gym, kayaking, swimming, and playing multiple musical instruments like piano and guitar.

Though this is my second post on the blog I hope it turns to be enjoyable for everyone to read or at least informative 😉

 

Open Source Project: Universe

Thanks to the blog Medium by Líkið Geimfari I came across an interesting open source project called Universe by OpenAI. Universe is a software platform programmed in Python that allows an Artificial Intelligence agent to use a computer like a human does. This is done by essentially allowing the AI to operate a virtual mouse and keyboard and view the pixels on the screen just like a human would. One of the use cases for Universe is to train an AI on any task a human can complete on a computer.

universe-site-facebook

A cool thing about this project is that it is tested on a large variety of video games which is quite impressive considering the complexity of most video games. The AI learns to be flexible and to adapt to new environments to complete certain tasks. The AI for Universe is rather unique because it’s not the usual game AI like an NPC or boss. The Universe AI agent is meant to replace the human entirely in playing a game using the same tools a human would use.

game universe library

Currently Universe has around 1000+ environments and showcase a variety of games on their website like Mirror’s Edge, Shovel Knight, Minecraft, and whole lot more. Universe works by allowing existing programs to become an OpenAI Gym environment without needing to mess around with the source code files or the programs internals. The “Gym” allows the AI to have access to keyboard and mouse events as well a display pixel information that a human would have which is truly impressive. I think this project will only continue to grow and will allow AI to become more and more intelligent and complex. Playing a game might be simple for a person however for an AI it is a completely different stories and requires the AI to be able to evaluate environments and react to what is being to displayed just a like a human does.