Wednesday, August 22, 2012

uncommon.js

A good friend of mine named Mike Jeffery has created a new javascript tool called uncommon.js.  Currently  no other tool lets you build a script without having all of the dependencies at package time and so Mike created one for a project our company is working on.  If you need such a tool please check out https://github.com/mjeffery/uncommon.  This tool is still in alpha so be nice about bugs :)

More info:
Modern javascript libraries like Backbone and ember.js often require lower-level libraries that are very common, heavyweight, or use shared-state configuration. For example: underscore or jQuery. The developers want to provide a single, prebuilt script but won't, can't, or shouldn't include the necessary libraries. uncommon is an alternative to the complicated and/or project specific tools used for packaging these scripts without their runtime dependencies.

With uncommon you can write and organize your library or application as simple CommonJS modules and then compile them into a single script. uncommoncan import dependencies from the global scope and expose them as modules; allowing your code to depend on shared libraries or legacy scripts that may already be loaded on the page. 'uncommon' can also export your module as a global symbol so legacy or inline scripts can use it without any loaders or modification. Projects configured for use with 'uncommon' are compatible with other CommonJS runtimes and package managers (such as npm).



Tuesday, July 31, 2012

The Internet Map

http://internet-map.net

From the site:


The map of the Internet

Like any other map, The Internet map is a scheme displaying objects’ relative position; but unlike real maps (e.g. the map of the Earth) or virtual maps (e.g. the map of Mordor), the objects shown on it are not aligned on a surface. Mathematically speaking, The Internet map is a bi-dimensional presentation of links between websites on the Internet. Every site is a circle on the map, and its size is determined by website traffic, the larger the amount of traffic, the bigger the circle. Users’ switching between websites forms links, and the stronger the link, the closer the websites tend to arrange themselves to each other.

Tuesday, July 24, 2012

The Mythical Man-Month: Essays on Software Engineering

Over the past couple months i have been reading through the book The Mythical Man-Month by Fred Brooks.  It was originally written in 1975 but many of the concepts still apply today. I have been apart of projects which have fallen into some of the traps talked about in the book. Below are some quotes (some paraphrased) from the book (one or two from my experience) i think everyone in senior management should think about before starting a large scale software development project:


  1. Never build when you can buy
  2. The programming project converges more slowly the nearer one gets to the end - plan for it
  3. Good cooking takes time; some tasks cannot be hurried without spoiling the result
  4. All programmers are optimists and are typically bad estimators
  5. Men and months are not interchangeable (in my own words:  you can not take 9 women and make a baby in 1 month just like you can't double your programming staff and expect to cut the project in half)
  6. Estimating is hard due to the fact that that programmers are building something that has never been built before.  If it has been built before then you should be buying it off the self...
  7. Because programmers are uncertain about our scheduling estimates, they often lack the courage to defend them stubbornly against management and customer pressure.
  8. Brooks's Law: Adding manpower to a late software project makes it later.
  9. Adding manpower to a software project increases the total effort necessary in three ways:  the work and disruption of re partitioning itself, training new people and added intercommunication.
  10. 1 good programmer is worth 10 mediocre ones


Monday, July 9, 2012

Ubuntu Linux - Removing files based on date

A little script to remove files based on date.
This command will remove anything older then 30 days:
find /data/server/log/ -mtime +30 -exec rm {} \;

This command will remove anything over 1 year:
find /data/server/log/ -mtime +360 -exec rm {} \;


Thursday, July 5, 2012

Office Communicator Server 2007 Simple Log - SQL

We currently use Office Communicator Server 2007 (OCS) and my boss asked me for a simple log of all the activity for the past month.  I thought an SQL Script would be easy to find on the internet but it wasn't so wrote my own and am posting it here:


OCS 2007 SQL - Simple Log:
SELECT MessageIdTime, uf.UserUri as [From], ut.UserUri as [To], m.Body
from LcsLog.dbo.Messages m
join LcsLog.dbo.Users uf on m.FromId = uf.UserId
join LcsLog.dbo.Users ut on m.ToId = ut.UserId
where 
m.MessageIdTime between '06/01/2012 00:00:00' AND '06/30/2012 23:59:59'

To strip out the HTML tags in Excel you start Excel's Replace (Edit/Replace or Ctrl+H) and put <*> (that is 3 characters, a less-than symbol, an asterisk, and a greater-than symbol) for your "Find what" condition and leave the "Replace with" field empty.

Wednesday, June 20, 2012

ODBC/DSN Adventures


I was having issues with the ODBC connections of a legacy classic asp project i was working on.


I received the error "the specified dsn contains an architecture mismatch between the driver and application".


Unfortunately the previous "developers" (i use this term loosely)  decided to use DSN connections instead of a real connection string like:
(oConn.Open = "Provider=SQLOLEDB; Data Source=SERVER; Initial Catalog=CAT; User Id=sa; Password=*************").


Because I am running a Win7 x64 machine i needed to use the x32 odbc driver and not the x64 one.  If you type ODBC into the start menu you get the x64 version whereas if you type c:\windows\sysWOW64\odbcad32.exe it will open the x32 version.  This also help when connecting a mysql server through ODBC to excel.

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.