LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Energizing the Next Generation: A Women In Tech Discussion at SQL Saturday #75

At SQL Saturday #75 Columbus, OH, on June 11, I had the distinct pleasure of moderating the Women in Technology lunch. The topic: “Energizing the Next Generation”. The panel: Jen Myers (blog | twitter), Sarah Barela (blog | twitter), and Erin Stellato (blog | twitter). The room: packed. The audience: awesome. If you haven’t been to one of our lunch panels yet, this is what you need to know: a group of women in technology sit up at the front of a room, talk about their experiences, and answer questions and foster discussions with the audience. The goal is to have an honest discussion about what women bring to technology, what challenges they have, and how to encourage women and girls to get involved in technology.

Read More...

Do you care that SQL Server Denali cannot be installed on Windows XP?

Dan Jones posted a blogpost here: http://blogs.msdn.com/b/dtjones/archive/2011/06/10/sql-server-code-name-denali-supported-oses-and-upgrade-paths.aspx showing what OS Denali can be installed on. _1) The current support matrix for OSes is as follows: Windows Vista SP2 or later Windows Server 2008 SP2 or later Windows Server 2008 R2 SP1 or later Windows 7 SP1 or later Denali will support upgrading from these SQL Server versions: SQL Server 2005 SP4 or later SQL Server 2008 SP2 or later SQL Server 2008 R2 SP1 or later

Read More...

SQL Saturday #75, Columbus OH: I Came, I Saw, I Ran

Another very fun, very successful SQL Saturday has been written down in the history books. The Columbus SQL Server User Group hosted SQL Saturday #75 on Saturday, June 11, 2011. Friday morning, I packed up The Mighty Honda Fit for a four-state road trip. I learned a very important lesson on this drive: I was crazy for not having a GPS years ago. I rolled into town around 6:00 PM, checked into my hotel, and headed to the speaker dinner. It was great to see some old friends there, and meet some new ones. I also got to try an amazing red IPA from an Ohio brewery that I can’t remember the name of, unfortunately.

Read More...

Saving Table Space (Quick And Dirty)

One of the quickest and easiest ways to make a database more performant is to reduce how much space the data takes up. Here’s a script that I wrote that’ll find each table in a database (run it in the context of the database). This script determines how many rows of data each table has (in kilobytes), determines the size of the data in the table, and then gives you a ratio of data per row. The higher a data/row ratio the more likely there is a chance of reducing the amount of space (note that I’m not looking at table indexes or fill factors, those are another topic to cover).

Read More...

node.js using mustache.js for templating

Introduction In my previous posts I [installed node.js][1] and I made the code be [a bit more readable][2]. Now I want to make the view a bit more HTML like so that it reads a bit better and to separate concerns. I selected mustache.js out of the many that are out there. Internal template first thing was to download mustache.js. I used a package manager for that. Namely npm. To install npm you must however first install curl via

Read More...

node.js making it a bit more readable

Introduction Let’s be honest the default Hello world code is far from readable and there is a bit of a mix of concerns there. var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(1337, "127.0.0.1"); console.log('Server running at <a href="http://127.0.0.1:1337/');">http://127.0.0.1:1337/');</a>``` So let’s split things up. ## Splitting it up First of all I want to split it up in a server class and a helloworld class. The server class makes the server and the helloworld class will handle the making of the page. If we would do extract method I would end up with two more functions. One to start the function and one to make the helloworld page. ```javascript var http = require('http'); http.createServer(start).listen(1337, "127.0.0.1"); function start (req, res) { helloworld(res); } function helloworld(response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello Worldn'); } console.log('Server running at http://127.0.0.1:1337/');``` Now that function helloworld would not belong in there so we would copy past it over to another file, namely helloworld.js. Now we just need our server.js to know where it should look for that function. ```javascript var http = require('http'); var helloworld = require('./helloworld'); http.createServer(start).listen(1337, "127.0.0.1"); function start (req, res) { helloworld.helloworld(res); } console.log('Server running at http://127.0.0.1:1337/');``` Do you see the require and how we put that in a variable so we can access it? Looks a bit like the require in PHP but it works differently. Now we can look at our helloworld.js file. ```javascript function helloworld(response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello Worldn'); } exports.helloworld = helloworld;``` look at the exports line. I guess you could compare this to setting a function public in C#. I think that is an odd way of doing things, but I guess you get used to it. ## Conclusion I guess I now have a simpler and more readable hello world. Which is the beginning to bigger and better things. The result is still the same. It’s just different. You should not forget that the same rules apply for all languages. Separate your concerns as best as possible and do the things there where they make most sense. The anonymous functions you saw in the first example can easily lead to more spaghetti code, be careful with that. Someone else will have to read your crap afterwards.

Read More...

Trying out node.js

Introduction Node.js is kind of a new kid on the block. You might have heard about it since it uses javascript and in the future everything will be using javascript. node.js is server-side javascript. And you can read what the point is [on their website][1]. Setting it up node.js is coming from the linux world so the best way to test it and play with it is to install [virtualbox][2] and then download a [Ubuntu VM][3]. I downloaded version 11.04. Best is to also install the Virtualbox extensions.

Read More...

Review: Physics of the Future: How Science Will Shape Human Destiny and Our Daily Lives by the Year 2100 by Michio Kaku

I picked up the book Physics of the Future: How Science Will Shape Human Destiny and Our Daily Lives by the Year 2100 mainly to see what is in store for humanity in the year 2100. Having read Ray Kurzweil’s 3 books on a similar subject, this was of interest to me. When people predict the future they usually underestimate the pace of progress, just imagine when you looked at CPUs between 1980 and 1985, you would never think that we would have quadcore CPUs in our laptops, these quadcore CPUs would outperform those clunky machines by such a factor that it is almost impossible to put it on the same graph.

Read More...

A week in Sybase Training, what did I learn, day 5

This is day 5 of my training and today it is going to focus on Backups, Advanced Backup Techniques, Sybase Central and Monitoring the System Backups Instead of backup and restore Sybase uses the commands dump and load, SQL Server people will be familiar with dump devices and the sp_addumpdevice stored procedure. In order to be able to perform backup, you first need to make sure that the Backup Server is running. You also need to add a dump, device, below is some sample syntax

Read More...

A week in Sybase Training, what did I learn, day 4

This is day 4 of my training and today it is going to focus on Bulk Copy, Automatic Recovery, Checking and Fixing Database Consistency Bulk Copy Getting the DDL The lesson started with showing how you can get the DDL for an object, you can use Sybase Central to do this or you can use the ddlgen Utility. Sybase Central is similar to SSMS, you right click on the object and select the Generate DDL option. The ddlgen utility is a Java based command line tool

Read More...