James Mickens on JavaScript

 

The Dilemma of Programming Languages

So, I’ve been up and laptop-ing for the last two hours or so, and all I’ve been doing is reading one article after another centered on programming languages. A good fraction of those articles lashed on how Javascript sucks. It’s been a lot of continuous reading, all thanks to catchy links located throughout the articles, and at any given time there have been at least 7 tabs (with articles) open at all times. Even as of now, there are exactly seven other tabs, besides Facebook, open in my browser.

It all started when I, scrolling through my news feed, out of sheer boredom, landed on a post by Richard Eng, an evangelist for SmallTalk whom I first came across on Quora, and while reading, I clicked on some other links and opened them in new tabs, and then the process repeated itself. The more I read, the clearer became Eng’s views on the different languages. It was clear that he hates JavaScript, and just the first part of this post by him shows that he definitely has a point.

While going through his list of his JavaScript alternatives, which are all basically Transpilers, I also discovered Brython, which is basically Python running in JavaScript’s place as the client-side scripting language. It’s pretty cool actually, although apparently the code is transpiled from Python to JS during runtime and that’s gotta take a toll on the performance.

Also, like countless other people, Mr. Smalltalk was kind enough to tell us that PHP is one of the three languages he can’t stand. While I agree that JS deserves to be on that list, my love for and comfort with PHP is too strong. It hurts when people constantly tell me that PHP sucks, and that it shouldn’t be used on any serious projects. Maybe they are right, maybe they aren’t, but I do believe that PHP is going to be around for a long time.

While reading about the desire for improvements to JavaScript, I wondered about what would be the best way to work towards them. They can’t just change everything like Angular did with the 2.0, that could break the web. But if they offer backwards compatibility, it would just keep growing and ultimately become a huge confusing mess.
I guess that it’s fairly safe to say, that with programming languages, it’s important to make the correct decisions during the initial stages of development.

You might be wondering what the point of this article is, or what exactly is the actual “dilemma.” To be honest, there isn’t a point. I’m just thinking out loud. Incoming opinions lead to indecisiveness, which in turn results in time going wasted.

 

“Harry Potter and the Cursed Child” – A cursed sequel

The title might be a little too harsh, but I assure you, I’m not the only person who feels that way. I read the script and sometimes I wish I hadn’t. While there are some revelations in it that I like, there are other parts that I just can’t accept are canon. … 

 

Stupid to kill someone

if you have a motive. -Jason Statham (The Mechanic)

 

“You miss 100% of the shots you don’t take.”

— Wayne Gretzky

 

Good judgement comes from experience,

which comes from bad judgement.

 

Danvers

PHP based real-time dynamic-site-generator. Browse the code on GitHub  Demo

So, on Jul 22, 2016 I started off with a small project that I had been meaning to develop for quite some time.  … 

 

6 Ways the Harry Potter movies are different from the books

Grab a portkey!

 

The Virtual Reality I want.

There’s something of a silent war going on around us at this time, and it has been going on for quite a while. I know that I wrote “Virtual Reality” in the title, but that’s merely due to the fact that it’s the generally preferred term for all of those projects out there making headsets and goggles, but otherwise this post does cover my ideas about its brothers that go by the names “Mixed Reality” and “Augmented Reality.”

So, before we go on, let’s talk about how the brothers differ. Virtual Reality is where Oculus is the major player in the market, and has met fine success. The HTC Vive is another which may not have stirred as much excitement but so far, all things positive have been said about it. The idea of virtual reality, in terms your grandma could understand, is that you put on a headset and you find yourself in a different world altogether. You look around, and all you get to see is what the headset shows you, while you are completely distracted from what’s actually around you. Rather like the Nygmatech in Batman: Forever. You put it on, and the next thing you know, you are in a forest; or perhaps in the middle of the French Revolution? … 

 

Interstellar vs 2001: A Space Odyssey

Ever since it’s release in 2014, Christopher Nolan’s “Interstellar”, has often been compared to Stanley Kubrick’s “2001: A Space Odyssey.”

I was fairly late at watching both. Since I missed the release of 2001 by more than 30 years because I wasn’t at all close to existing around the time it was released and for the the first few years after I had started to exist, it wasn’t entirely possible for me to watch and comprehend it.
As for Interstellar, all I have to say is that I wasn’t really watching many movies when it came out. I guess it was because my internet sucked and because I was dealing with exams so I put it off for a while, since I didn’t want to ruin it by watching it in a hurry. It wouldn’t have made much difference, but since I had heard good things about it, I wanted to be relaxed and with ample time before I set about to watch it.

My reaction to both was: What the hell?

2001: A Space Odyssey,  is considered the ultimate classic and some would go as far as calling it the best one of Kubrick’s works. (Having never watched any of his others, I can’t say much on the matter.)  So it started off with a music that sounded pretty familiar and that’s all thanks to Toy Story, and after a few minutes into it I was like what the hell? That scene didn’t have to be as stretched. And my reaction was pretty similar to the one in which a woman walks along a velcro’ed path carrying a lunch tray to a sleeping guy. The scene with the apes too was unnecessarily long so I fast forwarded through it and missed the actual punchline (i.e. how they suddenly discover that a bone can be used as a melee weapon). Oh and the part at the end that is known as the “Stargate sequence” All you see for 10 minutes is landscapes with colors messed up and for what?
Other than that, the lack of a decent conclusion might make it a cool suspense for some, but for me, it makes it suck. Nothing was explained. Although the novels that were released, and the sequel that followed, and countless fan theories suggested that it was aliens leaving all those monoliths and stuff. Let’s face it though, who watched the sequel or read the novels? Not a lot of people. 

… 

 

Minimalism and security.

Minimalism helps. It always does. It’s clean, cool, beautiful and relaxing. Oh and it allows for security in software. Every single element in an application, every single feature, every program in an operating system could open doors for attackers to get in through.

The recently discovered Mac malware Eleanor, which opens a backdoor, works by exploiting a vulnerability in the MacUpdate application.

iPhone jail-breaking applications, not that I have anything against them, make use of similar vulnerabilities. The original JailbreakMe exploited a vulnerability in Safari in iOS 1.1.1, while the second version used a vulnerability in the PDF reader.

I do realize that it looks like I am suggesting that Safari or PDF readers or updating apps should not exist, but what I am actually suggesting is that the more an app grows, the greater the chances for an attacker to get in. We can always, at the very least, keep stuff simple. For example, smartphones could have less pre-installed bloatware? Samsung could stop shipping their devices with apps like “Papergarden” or “Flipboard” or “Samsung Apps”  installed by default?

 

Does your personality change when you switch languages?

Lifehack thinks so, and I can’t help but agree. It’s something I have always noticed. Sometimes you switch languages while talking simply because you feel that some things are better said in a particular language.Different languages allow us to express ourselves differently.

From what I believe, it’s not a matter of having as many personalities as the languages you know, but a matter of how much at home you are with them. Some languages don’t allow you to be yourself as much as others and vice versa.

 

Const vs Let vs Var [JavaScript]

Follow me.

 

Constant pointers vs pointer to constant vs constant pointer to constant.

Here.

 

If telling the truth is deception,

then we are gladly guilty. – Megatron

 

On being the right size – J.B.S. Haldane

Gravity, a mere nuisance to Christian, was a terror to Pope, Pagan, and Despair. To the mouse and any smaller animal it presents practically no dangers. You can drop a mouse down a thousand-yard mine shaft; and, on arriving at the bottom, it gets a slight shock and walks away, provided that the ground is fairly soft. A rat is killed, a man is broken, a horse splashes. For the resistance presented to movement by the air is proportional to the surface of the moving object. Divide an animal’s length, breadth, and height each by ten; its weight is reduced to a thousandth, but its surface only to a hundredth. So the resistance to falling in the case of the small animal is relatively ten times greater than the driving force.

Read the whole thing here.

 

Contextmenus.js

Purely Javascript based solution allowing for easy creation of right-click context menus. Browse the code on GitHub. Demo

So, Haider posted on his Facebook timeline, a link to his then newly setup github repo which he had named “rightclick.js.” It was pretty clear what it was about so I gave his code a look. He is using JQuery, and (for some reason unclear to me,) NodeJS.

This morning, I decided to make my own in pure Javascript. I started around afternoon and got done with it a couple of hours ago. I wanted to call it contextmenu.js but there already exists a script by that name, and thus, out of respect, I renamed mine to contextmenus.js. The code happens to be a couple of files that together take up a total of 1812 Bytes of disk space. Everything  that you need to know, in order to get it to work for you, is explained in the README.md on the GitHub page.

 

Progresive Web Apps

You are using a computing device, be it a smartphone, a tablet, a desktop computer. It’s new, shiny, with little or no applications installed, apart from the bloatware that the manufacturer could have generously shipped with it. You fire up Facebook in a web browser, like a couple of pictures, post a status, have a small chat with a friend, and then after a while, you close the tab and lock your phone. After a while you do it again, and this time, you spend a whole hour scrolling through the news feed, and then once again you close the tab, and lock your device.

Now while it’s locked, and still connected, your device makes a decision. Assuming that you like Facebook, it adds a Facebook icon to your homescreen, or your app-drawer, for easy access to facebook.com. So the next time you unlock your iPhone, you simply tap on that icon, and it opens facebook.com in your default web browser. You love it.. It’s just a simple link, but it already feels great, and it could be better. Soon enough, after another day’s usage of the site, you notice that tapping the app icon no longer opens a browser window with facebook.com. Instead, you get a window solely running Facebook like it’s a standalone native application for your operating-system. … 

 

Physics 9702 Winter 2015 qp13 Q37

37 A network of resistors, each of resistance 1 Ω, is connected as shown.

1 Ω 1 Ω 1 Ω V 1 Ω 1 Ω 1 Ω 1 A

The current passing through the end resistor is 1 A. What is the potential difference (p.d.) V across the input terminals?
A: 2V
B: 5V
C: 8V
D: 13 V … 

 

From Windows 8 to 10 – The excitements and the disappointments.

tl;dr

I have been a Linux user for the past few years, but I grew up using Windows, and I have always been closely interested in it’s progress and moves.

When Windows 8 came out, I was like the only person I knew who didn’t hate the Metro. All my friends thought it was ridiculous, and truth be told, it was. It seemed as if they had forgotten that people neither have a bunch of huge touchscreens lying around in their place nor do they love the desktop experience in full touch, and Windows 8 was a weird cross between an OS optimized for touchscreen, and an OS that didn’t look like it would ever work well with touchscreens.

Accessing the desktop by clicking on a tile at the bottom left corner of the screen was oddly disturbing.. it felt like the desktop had lost it’s old integrity.. Like it was only a tile among many, like it was just another app like the ones accessed by clicking the other tiles. Furthermore, at times, it was hard to decide which world to live in: the metro, that had a really long way to go, and was far from mature, or the desktop that we’d both loved and hated for ages. For Developers, it both sucked and was an opportunity at the same time. They had a new platform to master; some would go on to proudly declare themselves to be of the first 100 developers for Windows apps. Some developers saw it as mere clutter. Another language and platform to come across and not-read articles of.

The question was: “Why?”

…