Programmers are notoriously nit-picky. We have opinions, stances, and preferences on just about everything and tend to get into frivolous (and often heated) arguments and discussions about our nit-picks. Compiled language vs. interpreted language? Nit-pick! Tabs vs. spaces? Nit-pick! Braces on same line or new line? Nit-pick!!!
In fact, programmers are so passionately nit-picky we invented a process to force our nit-pickyness onto others when they contribute code to our open source projects: code reviews! We even prefix some of our comments with “Nit:” for emphasis! (Do understand I am using hyperbole here. Code reviews are a good thing and I am grateful for them.)
Lately I have been reading the book RailsSpace (1st edition website) to expose myself to the Ruby programming language, Ruby on Rails, and MVC. I am not actually running any of the code, simply reading the book, code and all. It has been rather interesting and I may have to write a post on the experience when I finish it.
Continue reading “A programmer’s nit-picks”
I came across this little snafu yesterday while working on my capstone, which I was able to reproduce in all the major browsers.
If your form has any form of
<button> with a
name attribute of “submit” (
name="submit"), it will override the
.submit() method and throw an error when you try to call it (as I do in the same code above)!
Internet Explorer 11
Changing the attribute’s value to anything else, even “form-submit”, will prevent the method from being overwritten. So be aware of what you
name those inputs! They could introduce some pretty nasty bugs! It took me a bit to track this down because it was behavior I did not expect!
If you own a smart phone, tablet, “phablet” or follow the tech industry at all, you will have heard this one word used over and over again in a ton of blog posts (including this one), news articles, and pretty much anything else you can think of:
In the context of phones, tablets, and the like, fragmentation is defined in a basic form as:
Fragmentation is the result of many generations of smartphones or tablets running various versions of the same operating system.
While fragmentation has been primarily used in reference to Android and iOS, it is also present in Windows, Mac OS X, and Linux operating systems, though it is not near as severe there as it is in mobile devices. Further, fragmentation does not occur solely in the core of an operating system (arguably the worst kind), it can occur to any form of software. For example, Niels Leenheer wrote an excellent article on Android web browser fragmentation.
Continue reading “Android version fragmentation needs fixing”
On the morning of 10 October, I tired of working on my capstone and had finished contributing a patch to an open-source project, I decided I needed a small, fun, project to quickly create as a change of pace. A few minutes later, either inspirational or pure randomness stuck: recreate Windows Notepad.
According to the documentation,
defer a script?), so I wrote my own function using the basic idea of that snippet, which is the topic of this article. 🙂
You know what link anchors are, correct? They are used to jump between different sections of the same page. Quite often when a link anchor is clicked, the page smoothly scrolls to the desired location. However, smooth scrolling is not the native behavior. No, the native behavior for link anchors is to instantly jump between sections, which can be jarring and unpleasant. That is why many developers smooth it out using jQuery scripts like this one.
I too enjoy it when anchor links smoothly scroll, but for the last few months I have on a “jQuery fast” and it has severely limited my smooth scrolling options. Smooth scrolling is impossible to recreate with CSS transitions, I have had limited success using
requestAnimationFrame, and fun scroll-to-top buttons like Elevator.js are not appropriate. I have really been in the dark on filling the hole left by removing jQuery.
Continue reading “JS – Smooth scrolling without jQuery”
I was looking at the PHP 7.0.0 Beta 1 change log the other month wondering how much the language would *ahem* improve in this new, major release. As I was reading, I was surprised to come across this change:
Continue reading “JS – Multiple parameters with the same name?”