Category: Browser

McKinney Boyd HS Website Redesign – part 2

Website screenshot
Snapshot of the website main page as of February 10, 2016 at 11:48pm CST.

Following the developments of the previous blog post, Justin continued to work with us on finalizing his initial design in HTML. I was able to integrate the previous “JS template transclusion” idea into the website, while Justin pointed out to me that document.write(“) would suffice for multiple lines at once.

Furthermore, the old navbar has now been (unceremoniously) placed into the new website. Currently, we are stuck on moving the search bar and Quick Links to the top bar with everything else. In addition, the logo placement is a little quirky and could be fixed.

Work is now being done by the majority of the Computer Science 3 class at Boyd. Our main goals will be to create designs for the header, a uniform template for each page, and to create some of the code-needy features of our website, like a searchable teacher directory.

Our lead designer, Andrew Oakes, has proposed several new ways to design the website, all of which the dev team will take into consideration, especially concerning the header/navbar and the revamped directory.

Using computer science to efficiently print out and analyze Twelve Days of Christmas


I love using computer science concepts. They’re so helpful when you know them.

Today, I felt festive (it’s Christmas Day) so I decided to do something I’ve wanted to do for a while now so that I could sate my curiosity: Print out Twelve Days of Christmas using programming concepts. Even though I learned how to do these principles in Java, I easily transposed them to PHP, because I wanted to make this on a webpage.

I first began with researching the lyrics, as I could not remember much except for “a Partridge in a Pear Tree”, “Five Golden Rings”, and everything between. A visit to Wikipedia revealed the lyrics, which I carefully formatted and pasted inside an array. This was important, because I could then use this array in a for loop. Since the lyrics “count down” each new day, it would be very, very easy to do a for loop to print out the Twelve Days of Christmas.

Then, I put “a”, “two”, everything between, all the way to “twelve” in an array called “nums”. For the ordinal days (e.g. “first”, “second”, etc.), I put them “first” through “twelfth” into an array called “ordinal”.

Finally, I used a set of nested for loops to control the printing of the lyrics. The outer loop controlled which day we were doing, while the inner loop started from that day’s ridiculous gift all the way down to the partridge.

But I wasn’t done: I wanted to do the “statistics” behind the Twelve Days of Christmas, namely counting how many times a gift was given. For example, the Eleven Pipers Piping would be given 22 times because it was given on the 11th and 12th days, or two days. I used some simple algebra to come up with an equation that would determine this. Using a for loop, I generated the f(x) when x = 1 thru 12.

You can see the actual page and the GitHub repository for this little script.

Why I’m a lonely programmer


No, I’m not a loner. I have friends, trust me.

So what do I mean by a lonely programmer then?

Since I started programming in 2008, I have explored many types of programming, but what has always resonated with me is web programming. In fact, that’s why my business tends to concentrate on the web. My business MyWikis uses MediaWiki to host wikis, so naturally, since MediaWiki is written in PHP, I have become quite fluent in the language. Although it’s been derided for its confusing array of language constructs and inconsistent functions, it’s still important to web programming.

Why am I so interested in web programming, then, if its main languages are beginnerish and inconsistent? Because I know that desktop applications are lame, inaccessible, and unless it’s really good, there’s not much of a point in using them. I started web programming before HTML5, before Chromebooks, before the present era of the easy, modern web. Most people are interested not about downloading a web application and then using it, but simply typing in an address and getting all the information on a website. And if this website can do really cool things, all without leaving the comfort of one’s web browser, then that’s awesome!

Thankfully, I have an awesome group of friends that I’ve had for many years now, but they do not share the same passion for web programming that I do. (There are thankfully some exceptions, but more on that later.) While I slaved away at building MyWikis using PHP, JavaScript, HTML, shell, etc., my friends developed their interests in Java, C++, and other desktop development platforms. I do have minimal experience with desktop application development (some attempts at Visual Basic, Java, etc.), especially with my AP Computer Science and Computer Science 3 classes I take in high school. However, I still strongly resonate with web programming, and the recent developments of web programming has led me even further away from their programming passions.

Unfortunately, I’m an old dog, new tricks kind of web programmer, because the industry moves so quickly it’s unimaginable and hard for me to keep up with. The issue with old dog, new tricks kind of people is that they tend to stick with their old-style roots, which doesn’t help in an environment where new is (almost) always better. Now, the new thing is Node.js and since MediaWiki requires this in Parsoid, I am forced to bend down and get familiar with Node.js. And don’t forget Python and Ruby, which have somehow become backbones of the web. (I’m clearly in denial! :P)

Here’s where my exceptions come in. (Not try-catch ones.) Both friends are interested in web development and that makes me excited! One friend has recently picked up Node.js and has caused my school project with him and another friend to lead to two flavors: one in PHP and another in Node.js. I’ve got to hand him the trophy for “Most Modern Idea” but unfortunately Node.js just isn’t that mature yet, and I can’t really support Node.js because I don’t have the money for it. (Yes, that is my biggest reason why. Also, JS wasn’t that useful back then.) PHP is still more accessible to others with a tight budget and resources (cough cough that’s me cough cough) and that is why I continue to use it. Another friend develops in Python and helps Mozilla, and has actually created several creations of his own, which I support because they’re great ideas and I have just enough resources from my company to support him at the most basic level.

But I still feel lonely.

I might just have a really closed mind, or I might actually be a loner, but it’s mainly because web programming is so diverse and nobody comes near the web development associated with MediaWiki, WordPress, and other software like that. Node.js isn’t used for stuff like that, and Python is probably better suited for newer, larger, and more complex applications. The nearest cousins of MediaWiki in Python would be MoinMoin and I’m not getting into that! (I don’t think there is a MediaWiki in Node.js yet.)

Why am I so concerned with people knowing PHP or even remotely having some kind of passion for MediaWiki?

It’s hard to run a company alone, but I manage to do so because there isn’t anybody interested in what I do, even though it makes money! A company is supposed to be a team effort, and honestly would be much more fun and efficient if that was done. However, nobody has that passion, and being a teenager who has done this for half his life (yikes!) doesn’t help with finding people actually interested in developing with or maintaining a company about MediaWiki. Furthermore, the market is quite divided, with most people not even needing the services of MyWikis or they use a completely different wiki engine that isn’t remotely compatible, like TWiki or MoinMoin.

And that’s why I’m a lonely programmer. I’d love to be not-lonely.

(Friends-o-mine: I am so thankful to be friends with you! We’re just different, and the best of friends are fine with and embrace being different. I really like what you make on the desktop but it’s just not my true passion.)

Google Chrome vs. Mozilla Firefox – Which one is better for the user, overall?


Disclaimer: This isn’t a post about speed tests. It’s mainly about accessibility.

To be honest, Mozilla Firefox and Google Chrome are all great browsers, no joke. However, it’s hard to say which is better; Firefox has typically been the stronger one, and now it’s Chrome that took the throne. I originally used AOL, but then, learning from the norm, Internet Explorer 6. Well, when I found out about Firefox, I forgot about MSIE . (MSIE is an abbreviation for Microsoft Internet Explorer, now rebranded Windows Internet Explorer. No wonder its market share is lower. I don’t use the abbriviation WIE because it’s not the norm, and it doesn’t look like the norm.) But then, I was introduced to Chrome, when it was just released.

It’s not like Chrome 20; it sucked badly. Chrome 1 always crashed, so I said to myself, “Forget about Chrome, let’s go back to Firefox”. I’ve always been loyal to Firefox since 3.0. Now, it’s already Firefox 14 (albeit its switch to a new speedy versioning system), and it looks like Chrome is very good, as it is literally the new champion – MSIE is no more. Chrome’s market share is now dominant, and there appears to be a consensus, no joke.

Firefox is a great browser, no kidding. It has many add-ons and it’s very customizable. It’s synchronizable, but it’s not connected to anything else than Firefox (and quite possibly Thunderbird; except I don’t use it!).

But Chrome is different. It’s synced, and since I use Google’s services commonly, especially Gmail, it is a great browser for me. It has an app store, and it’s definitely synced with Google Play. I don’t have an Android, but I do use Google Drive. Drive looks promising and beats DropBox ferociously. Good thing I didn’t download it yet.

Microsoft has Bing and its services, but it fails to sync anything, even with MSIE 10. Wait, what? Microsoft has Windows Live and yet it still fails to realize that its preloaded desktop applications won’t work, it’s the BROWSER they have to dig into.

Besides, I’m using (a) Mac (OS X) right now, and IE isn’t cross-platform (anymore); it’s only for Windows. That’s why it fails.

Safari is more interconnected with the OS mainly if you’re using a Mac AND it’s OS X 10.8 (Mountain Lion). That can’t do well – Safari’s Windows version obviously fails. Opera isn’t even NEAR Chrome, so it might as well shut down and join Chrome or Firefox.

Poor Firefox. I hope it won’t end like Netscape.