PHP – Abstracting uniqid()‘s $more_entropy parameter

This is more of an observation/thoughts post and not a tutorial or analysis, so apologies if it is not in the same style you have grown accustomed to on here. :)

The other day while working with some PHP, I looked up the documentation for the uniqid() function to discover what it did and why this code was using it. At the bottom of the page is the following note:

Note: Under Cygwin, the more_entropy must be set to TRUE for this function to work.

What struck me about this note was the lack of any other environments the more_entropy parameter must be set on for the function to work. It would appear it is only required for Cygwin.

Continue reading

Open source… Discrimination?

Fun fact: this post was initially drafted on 16 October, 2013!

If if I have never made it clear before, I love open source software. Some of the best software around is open source: VLC, FFmpeg, Audacity, LibreOffice, CamStudio, Python, Firefox, the list goes on and on. The world of open source is vast and ever-expanding, thanks in part to large proponents such as GitHub, Bitbucket, and popular open source applications. You never know what you will find in this huge world.

Yet I often see almost a form of discrimination (a word you only hear from me once in a blue moon) against this amazing world. Where, when, and how such a notion came to be I do not know, but it is generally as false as old wives tales. Tell me, has your mother’s back ever been broken by you stepping on a crack in the sidewalk?

Continue reading

CSS – Overqualified or more specific selectors?

How many times have you seen CSS like this?

img.alignleft {
  float: left;
  display: inline;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}

img.alignright {
  float: right;
  display: inline;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}

If you were to run this through CSSLint, one of the warnings it throws would be “Disallow overqualified elements”. To quote this CSSLint documentation for this warning:

Continue reading

A new triangle

I speak, of course, of my highly visible triangle logo/icon/thingy. What started out as a quick MS Paint graphic has over time evolved into my personal symbol, identifying anything with it as my own.

As any good marketing plan should do, sometimes a logo needs to be tweaked with corrections or to match current design trends. My triangle has changed nearly year since it was developed in 2012, oddly always occurring around April. It started out as the aforementioned MS Paint version:

Continue reading

The single worst line of code I have written

As much as I would love to think I am the perfect programmer who makes no mistakes and whose code is 100% bug free… I am reminded way too well that I am not all that and make lots of code mistakes. I was reminded by this sad truth ever so clearly while working on some older JavaScript on the 29th of May. After extensive testing and analyzing, I concluded that a single line of code in the script was the single worst line of code I had ever written. Are you ready for it?

Continue reading

Overusing z-index

z-index is a fascinating CSS property with complicated interworkings. For most Web designers, myself included, z-index is the ticket to getting certain page elements to “sit” on top of or float behind other elements. It especially shines when creating navigation bars that stick to the top of the page when scrolling and the “scroll to top” buttons, just to name two common examples.

However, in my travels and quest for Website design tips, tricks, knowledge, and useful libraries, I have found instances where z-index is abused. While the reasoning behind it may have been sound to begin with, Web design trends change, and what made sense then may not anymore, meaning such z-index usage might now be considered overuse or even abuse.

Continue reading

Blocks v2.1.0

It is yet again time for another release of Blocks, version 2.1.0!

As you may recall, the last Blocks release was v1.0.0. Why such a large version jump? Well, I did this to make up for my failure in releasing v1.0.0. You see, I essentially rewrote Blocks in v1.0.0. It was without a doubt the biggest changes I ever made in the program’s lifetime. v0.9.1 was really and truly the v1.0.0 release, and with the large changes I made last time I should have called it v2.0.0. Thus in this version, I am rectifying my mistake + the changes I made this time around. That explains the version increase. :)

With that bit past, I can move on to the biggest news in this release.

Continue reading