Node Against Humanity

GitHub-MarkThere has been ton of talk about Node.JS and IO.JS all over the web. Well, I am not here to discuss any of that. In fact I personally hope they decide to come back together. However, that is just my opinion.

Although on a positive note, after weeks of debating and school work, I have decided to release a private repo. to the public. Node Against Humanity! This socket based multi-user game has been my baby this winter. Yet it is time to let go. A sad but beautiful day for me. Please take care of it internet…

Given there will be a few bugs. The install and use is pretty straight forward. Simply install node and install the 3rd party packages. I’ll leave the details for the README. Yet if you do find a bug.. make an issue on Github.

** This project is looking for an icon/logo .. if interested, just let me know!

Does It Exist via SQL

Ran into an interesting problem today. I have a database that I need to analyze and then return a True/False value for if a certain row in a certain column is empty or not.

I was able to solve this problem using a Case Statement.

[ Source: ]

How To Fix The “ENOENT” Error Cause Via. Node.JS’s NPM Tool

Today I was working on installing nodeunit for a test project I was creating, when I ran into an interesting error. NPM Enoent Error This is a weird error. It would seem that NPM couldn’t find the folder under my $appdata%/Roaming folder… Therefore there must have been a problem when I first installed Node.js. The fix is simple. Go to the path and create the folder by hand. From there you should be completely in the clear! Give your npm command another try and enjoy!

New Laptop – Lenovo Yoga 2 Pro

If you haven’t been keeping up with my posts lately, then you are probably unaware of how I have been without a fully functioning laptop for the past couple of weeks. WELL! As of today I am no longer without a machine! Between my savings and a surprisingly random gift from my parents(Thank you so much!) I was able to get the Lenovo Yoga 2 Pro!

Now before you start bickering.. yes I know I just said the Lenovo Yoga 2 Pro.. that is because I wasn’t really interested in the 3 Pro… Yes, I am an outcast. Duly noted.

I won’t bother you with why I picked the laptop I got, because it is all based upon my opinion. Although I will mention.. I did get a very good deal… originally it was $1600 and I purchased mine for only around $1k. I am very pleased with my investment so far(Only had it for the day, dorks).

Without further adieu I shall present some photos:


DotNetNuke Performance Tips

Every website run’s into the ghost of a machine. Latency issues? Long responses for client requests? All ghosts, in which can make managing a DotNetNuke instance very painful. But what can we do?

Lets try and solve a couple of these problems!

Database Size:

As you can guess, the size of your database is very important. Lets clean it up a tad.

First take a look at your “EventLog” table. As you can probably guess from the name, it stores events that happen such as when a user log’s in, when someone tries to login, and just general errors that occur. Yes this is important, but honestly… it is only important in the beginning and the end of your applications life. During the middle of the applications life cycle, I suggest turning it off. Make sure you delete the irritating records left in the DB as well.

To Turn off the Event Log, go to your DNN Host Settings page, and ensure the “Site Log History” setting is set to 0(zero).

A couple other tables to clean out would be “SiteLog” and “Scheduler log”.. These records are also just wasting space on the disk.

Database Scripts:

As well, DNN has plenty of washed-up crappy scripts in it’s possession. You can fix a lot of this by using DNNScripts off of codeplex.

The Application:

First thing to keeping a clean application, is when hosted with IIS. Make sure you application stays alive! If no one visits you website once every twenty minutes, IIS by default shuts it down, therefore causing the first user after those 20 minutes endure a painstakingly slow initial page load time. You can prevent this by using Pingdom or PingAlive . However, if you have access to the server, I suggest you change the Idle Time-out settings.

Afraid that the pinging will mess with your site statistics? Try creating a sub site, on the same application and then having the service ping it instead. That way you can go about your business as usual.

Here is another good resource on ensuring your application is alive at all times. I haven’t actually tried it though.. as it is not specific for DNN. : CodeProject – Keep Your Website Alive

Does you site have a lot of static information? Cache it! You can do this via changing the performance settings to heavy caching.

Module Optimization:

Make sure you use SQL Profiler to find long running scripts, usually from 3rd party modules. Then report those issues to their developers. I like to think, no script should surpass 500ms on the norm.

Remove unused modules from your server. If you aren’t using them, then neither should DNN. Get rid of them!

Your Skin:

Install YSlow and make sure you get an A for performance! You can usually find errors in how things are GZIPed and maybe combine your CSS and JS files to get better performance.


Hopefully one or a few of these methods described will help you with your site. If you have any other tips or comments about how to improve DNN’s performance, feel free to let me know with a comment below.


TOTD: Count the Rows displayed in a Table With Javascript/jQuery

I use to do a lot of simple things using JavaScript to manipulate webpages that were not mine. Whether it be to make the font size bigger, or theme a site to my preference, it never dawned on me that I would need it in the real world.

Here is a simple JavaScript function that anyone could of written. I use it to count the rows in a table when I am working with data on webpages. It is usually better as a bookmark.


Node.js – Manage Connected Users

Frustration has fallen upon me during development with Node.js and I’ve been working on a simple card game for the past month or two and keep running into an issue with the library. That issue is the complexity of user/client management. Therefore I am currently working on a “Proof Of Concept” to help me work out the kinks for and user management. If you’d like to join me or just view my progress feel free to check out the repository as follows.

Node Client Manager

P.S. Suggestions are welcomed.

TOTD SQL Join Statements

Personal Notes:

INNER JOIN — Join columns, however remove records with null values.

LEFT/RIGHT JOIN — Join columns, and leave all columns there.

FULL JOIN — Join columns, even if there is only one match between tables.