Funny People To Follow On Twitter

There is a lot of noise on Twitter and equally as many people generating the noise, it can be hard to find people worth following. I generally like to follow funny people (besides the usual developer who isn’t really funny).

Here is a list of funny people you should look into following:

  1. Moose Allain
  2. James Martin aka Pundamentalism
  3. Roger Quimbly
  4. Paul Bassett Davies aka The Writer Type
  5. Conan O’Brien
  6. Steve Lolli
  7. Bill Burr

A Proposal For A Better Online Voting System

Hacker News, Reddit and Stack Exchange all share a similar trait with one another: voting. You can either up-vote or down-vote depending on restrictions the site has in place. Social voting systems are inherently flawed and subject to manipulation.

Just a little food for thought:

  • Limit the number of up-votes a user has per day. If up-voting is more scarce, people will selectively be more careful with how they spend their votes.
  • Limit the number of votes a user can perform in a 10 minute period. Imposing limits on the speed of voting means a user will be even more selective with how they up-vote content.
  • If a particular piece of content makes it to the homepage (for example on Reddit or Hacker News) a user should be awarded X amount of up-votes to their quota which they can spend. This award value would be capped to prevent hoarding.
  • Voting history is public. All votes a user has performed should be public: both up and down-votes. This will mean a users voting activity is public and thus will help reduce spam/gaming of the site.
  • Possibly difficult: but a problem with a lot of voting systems, especially for social link sites is that people up and down-vote based on titles without clicking through to the content. Either checking if the user visited the link or imposing a timer before a user can vote would also help.
  • Down-voting costs karma/points. Stackexchange already do this on all of their Q&A websites, other sites should adopt this approach. If you disagree with a submission, maybe leaving a comment is a better idea than down or up-voting it.
  • The more selective a user is with votes, the weight their vote has. If a user has voted a lot, their votes should less weight than that of someone who votes more carefully.

How To Plan & Envision a Web Application From Start To Finish

You have your idea, you have the skills/means/money/time to build it: but where do you start?

The first reaction of many will be to rush right into design and or development of your idea. But wait, you haven’t even scoped out your idea yet. Why are you rushing off to start building something that is only 1% of the way there?

As a developer with limited design knowledge, I used to be the same. The excitement of potentially building something you think is the worlds greatest idea can sometimes get the better of you. I would rush right into the design and development phase without a care in the world and ultimately I would never complete the project because I never thought it through.

Before you build or design anything, you need to determine what it is you want to build first before you rush into designing or developing anything.

Answer these questions in as few words and succinctly as possible

  • What are you building?
  • Who is it you are building it for?
  • Why are you building it?
  • Who are your competitors?
  • What makes your idea different from your competitors?

Now what you need to do is map out your idea. Write it down on a piece of paper, draw it on the walls or a Word document. Just like it is considered smart to write a shopping list so you know what you need before you go shopping, you are writing a shopping list for your app plus the meal plan.

Now it is time to model the data structure of your application

What are the key components of your application? How do they connect to one another?

An example of a blogging application would look similar to the below:

Users
Roles
Pages
Posts
Comments
Categories
Tags

If you want to go deeper, you can also write down what fields each data type will have. A user will have at a minimum; username, email and password fields. These individual data components in an ideal world should relate to database tables, but they don’t have too. We’ve just sketched out what the models in our application will be.

Now you’ve worked out the key components of your app, how do they tie together?

Users can have multiple roles
Users can own many pages
Users can own many posts
Users can make many comments

Roles can have many Users
Roles can have many Pages
Roles can have many Posts

Pages can only have one User (owner/author)
Pages can have multiple Roles (allowing for role restrictions of a page)
Pages can have many Comments
Pages can have many Categories
Pages can have many Tags

Posts can only have one User (owner/author)
Posts can have multiple Roles (allowing for role restrictions of a page)
Posts can have many Comments
Posts can have many Categories
Posts can have many Tags

Comments can only have one User (the original comment owner)
Comments belong to a Post
Comments belong to a Page
Comments can have multiple Comments (comment replies from other people)

Categories can have many Posts
Categories can have many Pages
Categories can have many Categories (Allows for nested categories, parent/child)

Tags can have many Posts
Tags can have many Pages

Congratulations, you’ve now mapped out your data structure.

Now there is just one more step before you can start building: an application map.

It sounds fancier than it actually is, we are essentially going to map out a loose site structure. Of course it is impossible to determine what our final structure will look like, but it’s better to have a rough starting point.

Using the blog application example we used earlier, we might come up with something like this:

Homepage “/” — This is the first page any visitor will see. It will show 10 of our latest blog posts.

Search “/search/searchterm” — The page that will display search results.

Single Page “/page/pagename” — The page that will display our page contents when someone visits it. This will also display a comments form and any comments others have already made.

Single Post “/post/postname” — The post that will display our post contents when someone visits it. This will also display a comments form and any comments others have already made.

Login “/login” — A page with two fields, “username” and “password” that will log our users in.

Register “/register” — Where new users can register for an account.

Now you know what you want to build. You can supply your sitemap to your designer and your data map to your developer and your end product should be how you envisioned it.

Keep in mind the end-result won’t be exactly how you pictured it. The result could be better or worse depending on if you stick to the plan or not. Use this blog post as a loose guide, it works for me and it might work for you.

The Imminent Financial Collapse

The global economy is sick, in-fact it has been sick for a very long time and has been collectively covered up. But eventually like all lies, the truth does come out and by the time it does, those who were actively involved got out long before the signs of trouble started showing.

I am not a financial expert at all, I am just a web developer. However, I do keep on-top of what is going on in the world, and I don’t accept things at face value, I read into things and do research.

You’ve heard many people proclaiming the economy is going to implode once more and the effects will be worse than they were during the 2008 Global Financial Crisis. You’ve probably heard it repeated so much that you brush it off as conspiracy theory nonsense.

Remember in 2007 when experts started coming out of the woodwork warning people of the imminent GFC in 2008? People brushed them aside and called them nut-jobs, even the US government in particular right up to the end denied the economy was in a bad way. The knock-on effects of what happened during the GFC are still being felt by many today.

We very much live in a “in the moment” type of society. We have Twitter, we have Facebook and various means of obtaining news on just about anything the very moment it happens and as such have developed relatively short memories incapable of learning from past mistakes. Can you remember back to 2008? Do you even remember what caused the GFC?

The general perception of most is that what happened in 2008 was a relatively minor incident and in the greater scheme of things was nothing more than a bump in the road. The sad reality is things never got better. Even though the media and financial experts proclaimed things were improving and are currently okay, they know it is what they have to say.

The volatile nature of global financial markets that react even to the slightest form of panic would collapse if the truth were to ever be revealed as to how bad things are. The truth is dangerous and it is a known secret in most major financial industries that you never tell people things are bad until you have too.

Cyprus is a perfect example of what panic can do, people made gold rushes on their banks to withdraw money when they learned what was going on with their economy, the banks halted large withdrawals for quite a while as a result to stem any major damage.

It all comes down to debt. It is a double-edged sword, banking institutions and lenders need to lend people money to keep their businesses going and as witnessed with the sub-prime mortgages fiasco that partly caused the GFC, when people can’t pay back the debt it causes problems, especially when the amount that was lent cannot be recovered.

If you are like most, you most likely have one or more types of debt. Car loan, home loan, credit card or something else, chances are you have one or more of those types of debt. Say for example you have a credit card with $2500 owing on it, if the bank called you tomorrow and demanded you paid the amount back in full within one month, would you be able to make the payment?

I rephrase, would you be able to pay the $2500 back without getting into more debt elsewhere? If you’re like most, the answer is probably a resounding no. Puts it into perspective a little bit, right?

Debt coupled with rising food costs, the price of fuel in Australia being around $1.50 per liter and climbing, expensive public transport and low-salaries, people are struggling to make ends meet. Coupled with other costs of living like housing, electricity, water and clothing, you soon realise your perfect life is being held together by thin string capable of fraying at any given moment.

The real question is, are you prepared? Nobody can know for sure when things will get bad again, but the signs aren’t looking too good. Global unemployment rates are rising, industries like; retail, manufacturing and mining are stagnant.

You only have to devote an hour or so to research and see for yourself things aren’t as peachy-keen as they appear. While the economy might not collapse today, or tomorrow, it doesn’t mean it won’t happen eventually.

You should have a plan. Hopefully you won’t need to enact upon it, but it is good to be prepared:

  • Write-up a savings plan. Work out how you are going to pay off your debt and whether or not a consolidated debt loan could be beneficial for you
  • Consider investing in precious metals instead of stock. If the economy were to collapse, the only accepted form of currency would be something physical so; gold, silver, platinum or any other precious metal
  • Before you go shopping, write up a loose meal plan for the week so you don’t end up buying more than you need. Planning meals ahead will save you a lot of money
  • In an ideal world having at least six months worth of savings will help you through potentially troubling times like sickness or unemployment. Save whatever you can, put it away somewhere safe.

Ignorance is how people lost their homes, their jobs, livelihood and even lives during the 2008 GFC. Keep informed.

Switching From iPhone to Samsung Galaxy: One Year On

Almost a year ago I wrote about making the switch from iPhone to a Samsung Galaxy S4 phone. I thought I would write a follow-up article about how the switch went and other observations.

I am still happy with the choice I made and cannot see myself ever switching back to an iPhone unless Apple all of a sudden make their phones less limited. The Samsung Galaxy S4 is a solid phone, but there have been caveats.

Although performance is still great, the phone is rather unstable at times because of a combination of the operating system, rogue applications and the extra plethora of services Samsung add into the fray. The latest Kit-Kat Android update introduced a few issues with touch screen responsiveness that comes down to the GPS functionality.

The phone tends to run out of memory quite quickly. You get into the habit of forcefully closing open applications every so often to prevent the phone slowing down and becoming unresponsive.

As predicted in my original post, the crappy plastic backing was the first thing to degrade on the phone. Just from being put in and taken out of my pocket, the Samsung letters on the back have disappeared. It hasn’t cracked, besides the letters the backing has survived.

The plastic frame around the phone where the front meets the back has partially degraded though. It’s not overly noticeable, but I noticed it. Because it’s plastic, it has just worn. For a phone barely a year old, it’s a little disheartening.

In terms of applications for the phone, there isn’t really an app you can’t get on Android. Once upon a time it was common for iOS to get an app and Android not to get it at all, it’s all changed and you can get the same apps as your iSheep counterparts can.

I would probably go for a different Android phone next time. I was initially considering the HTC One, but expandable memory was a deal breaker for me. If the S6 increases the build quality, I’ll probably buy one.

As I said, I am happy with the choice I’ve made and am officially an Android convert.

Client Website Killswitches = Bad Idea

Whilst looking on Designer News, after looking on Hacker News first (of course) I came across an interesting submission titled Kill Switch — A small bit of javascript to kill a website should the need arise

I won’t deny I’ve toyed with a similar idea before, but abandoned any such endeavour in favour of a well-defined contract before starting any work. Essentially this code is a back door, albeit a mild one.

Using a jQuery getScript call, the Javascript will make a request to the safe domain (domain the developer owns) on every page load. Every page load, you’re loading Javascript from a remote location that could have anything in it.

NEVER, I repeat, NEVER resort to using anything like this. Besides looking like a piece of shit, it could be used for the wrong purposes and come back to bite you in the end.

Before doing any work, make the client sign a contract. Make sure the terms in the contract are specific and related to the project you are working on.

Oculus Owe You Nothing: So Stop Your Whinging

Unless you’ve just connected to the Internet for the first time (and if so, welcome) then you would have heard about Facebook purchasing Oculus VR for $2 billion dollars. You would also be aware of the massive amounts of backlash and criticism Oculus VR have copped as a result of the announcement.

This isn’t an entirely new trend. Every time a users beloved service gets acquired, a small but rather vocal subset of users start shouting from the rooftops of their suburban rental homes.

It happened when Facebook bought Instagram, it happened again when Facebook bought Whatsapp. But in the end the panic and disdain is short lived. Instagram’s user numbers are up and Facebook has kept its promise of it being operated separately.

This isn’t one of those situations where a startup with millions of users has been bought out by a big behemoth, it’s a company that begun because of a highly successful Kickstarter campaign funded by the public.

The company raised $2.4 million from 9,522 supporters through Kickstarter campaign in September, 2012. Understandably a lot of those supporters are pissed off they funded a company that sold out to the man.

Even Minecraft creator Markus “Notch” Persson got in on the debate proclaiming he isn’t developing Minecraft for the Oculus Rift any longer and thinks Facebook is creepy.

As hard as it might be for some to accept the fact: Oculus VR owe you and anyone that supported them via Kickstarter nothing.

All promises that Oculus VR made during their Kickstarter campaign were fulfilled which in itself is an achievement, as there have been several high profile cases of delayed and failed Kickstarter products where backers got nothing.

Much of the hate and disdain for the way things have gone is pretty much a big misunderstanding of how crowd-funding actually works. Kickstarter is not an equity crowd-sourcing platform.

In-fact, this is made as clear as night and day on their guidelines page.

Creators cannot offer equity or financial incentives (ownership, share of profits, repayment/loans, cash-value equivalents, etc).

Then we can take it a step further and see what Oculus VR promised on the original crowd-funded campaign here.

For $275 Oculus VR promised:

UNASSEMBLED RIFT PROTOTYPE KIT + DOOM 3 BFG: Try building the prototype yourself! You’ll receive your own DIY kit for building the Rift from scratch, including all of individual parts for the prototype as well as instructions for assembling it by hand. It will also be shipped out a month earlier, before the official dev kits. This also includes a copy of Doom 3 BFG, and full access to the Developer Center, SDK, docs, samples, and engine integrations! (Please add $30 for international shipping) NOTE: This DIY kit is only for true hardware geeks equipped with a hot glue gun. We encourage most of you to get the standard version below!

For $300 Oculus VR promised:

EARLY RIFT DEVELOPER KIT + DOOM 3 BFG: Try the Rift for yourself now! You’ll receive a developer kit, perfect for the established or indie game developer interested in working with the Rift immediately. This also includes a copy of Doom 3 BFG and full access to our Developer Center for our SDK, docs, samples, and engine integrations! (Please add $30 for international shipping)

As pointed out, Oculus VR delivered on everything they promised. All early developer kits were shipped to the supporters who donated to a tier that promised a developer headset.

Nowhere on the page for the original crowd-funding project did it say that Oculus VR would not raise venture capital and nowhere did it say they wouldn’t sell the company if they were given an offer.

So while many will look at it from the perspective of Oculus VR selling out and cheating supporters, they delivered on all of their promises and nothing more. The costs of hardware development are considerably higher than that of software development, the tooling for the aesthetics alone can be a tidy sum in itself.

If you look at the purchase from a non-greed point-of-view, you’ll see that Facebook’s connections within the technology community, pools of sweet IPO investor dollars and desire to enter the virtual reality space will only help Oculus succeed, not kill it.

No company in its right mind purchases something for $2 billion only to run it into the ground. Lets be logical here. Stop being entitled douchebags.

MongoDB Isn’t As Bad As You Think

I, too used to be a MongoDB naysayer and lets face it, in its early days and even up until recently MongoDB was a steaming pile of shit. Not only that, but completely forgoing things we take for granted in a traditional RDMS is something many have a hard time getting accustomed too (hello transactions).

Yes, prior to version 2.0 of MongoDB there were a few issues, one of those issues namely being the global write lock blocking all queries problem. In version 2.0 they basically addressed the issue, in version 2.2 they removed global write locks altogether.

After prototyping a little something-something I am working on in Node.js and MongoDB, I’ve changed my tune. I hadn’t used MongoDB in a while and decided to give it another shot on this project because I don’t need to define a schema, well I sort of do because I am using Mongoose JS, but that is besides the point.

Most of the hate directed at MongoDB is a lack of understanding of the tool being used. If you don’t understand what you’re using, why even bother using it? MongoDB is no different.

A bad mechanic will always blame his own tools. A bad developer or systems administrator will always blame the tools and or language instead of themselves. Blindly using something just because highscalability.com is talking about it and failing to understand how to appropriately use it is nobody’s fault but your own.

Sarah Mei, a Ruby developer who helped out on a project that tried to compete against Facebook and ultimately failed called Diaspora recently posted an article titled: Why You Should Never Use MongoDB.

Basically the TL;DR was: don’t use a non-relational database for relational data. This is an obvious misjudgement on the development teams part. It’s not the fault of MongoDB it was made to try and work for the wrong purpose.

Every time a feature changes or I want to add something new in or remove something old, I don’t need to fire up Navicat, write a migration file or use PHPMyAdmin to change my database structure. And herein lies the beauty of MongoDB and pretty much any other key/value store type database: the ability to rapidly prototype an evolving application.

I haven’t decided if MongoDB will be used for the end-result as it is a social networking type application, but so far I have not run into any problems using it and actually find it enjoyable.

While I am not currently using MongoDB at scale, for prototyping purposes it is more than adequate. And even if I only use it for this stage of the project, it has been more beneficial than MySQL ever could be in similar circumstances.

Open Source Database Schemas

The database is the most important part of a modern web application, regardless of whether or not you use a NoSQL solution or MySQL. Sometimes when building a new application and it comes time to architect the database, it can be too easy to build a database that doesn’t accurately encompass the goal of your product.

The database building part is the part I find myself getting stuck on. What tables will I need? What field types should I use? Denormalise or normalise? Once you get further on up the road and your app is in full swing, it can sometimes be painful going back and changing fields, adding new ones and removing things (especially if you don’t use migrations).

I’ve created a repository on Github here which I will be updating from time to time with new schemas. Things like notification schemas, schemas for social networks, question and answer websites, niche schemas and more.

The reason I created this repository is because there are no resources out there helping you build the right database structure. If you search hard enough, you will find bits and pieces, but nothing substantial, up-to-date or even helpful most of the time.​

Use the schemas as a rough guide, they’re not actual schemas in the sense of the word, more like database models.

I encourage you to submit your own schemas and or improve upon existing ones so we can make this a decent resource for someone wanting to architect their own web application and needing a good database structure.​

Samsung Galaxy S4 Kit-Kat Non-responive Touch Screen Issue Fix

If you’re like lots of other Samsung Galaxy S4 owners, then you’ve probably updated to the latest and greatest version of Android dubbed Kit-Kat. Don’t be fooled, this latest inclination of Android OS is anything but sweet.

An issue that seems to plague Samsung phones, the S4 in particular, but also most likely the Note series of phones (amongst others) is the touch screen has intermittent responsive issues.

For me, the lower half of the phone buttons and touch screen would not respond to any touches (sporadically). The only way I got the phone to respond again was hitting the lock button and then pressing it again, the screen comes good again, but only temporarily.

Resetting the phone, factory resets and reinstalling the OS don’t even fix the issue. They’re temporary fixes but ultimately the response issues are due to bugs in one or more components of the new update. It seems too much focus was put on marketing and not enough on testing.

The fix I’ve found through trial and error comes down to a little service called WatchOn. The WatchOn service handles the universal remote functionality of the phone, the one aspect you probably never use.

  • Go to settings, More and then Application Manager.
  • Scroll across to, “ALL” and look for “WatchON” then press it
  • Then you’ll see a few buttons, press on “Disable”
  • You’ll get a message about causing problems, blah, blah. Press OK. You will then be prompted to install the factory version, say OK to that as well.
  • The WatchON service will reinstall itself and after it’s done, press the “Enable” button. It’ll be one of two buttons how pressable.

That should be it. Supposedly disabling the GPS functionality also helps as does setting your lock screen widgets to “Clock”