All posts by beans

Stupid Simple File Server from Spare Parts

Another installment of things I like because the just work.

I frequently have the need to spin up a file server, either for temporary use or for longer term storage.
Recently I was migrating a system from one place to another and needed a large amount of fast temporary storage.
At home I have a file server for mass storage of music, videos etc.

There are lots of solutions to this. Could always just use an old Win XP box, or set up a Linux server using your favorite distro. Then there are free software systems, FreeNAS is a good example.

One I like is Server Elements.
They have a line of products including one that boots from a floppy! Hardware requirements for all of the products are very modest. Basically take some old PC, stuff it full of old disks, create a bootable CD, or Thumb Drive and off you go. Prices range from $10 – $35 for the 64bit product with some media streaming capabilities.

For quick set up – Server Elements is really great and worth the small price.
If you want more features, FreeNAS is a very good choice.

Here is an excellent article on the topic.
http://www.smbitjournal.com/2012/04/choosing-an-open-storage-operating-system/

Swiss Army Knife of SMTP Servers

Just wanted to give a shout out to my favorite SMTP Server.
When you find yourself needing a robust, easy to configure and support SMTP IMAP/ POP3 server that can handle about any messaging need you could think of … check out MDaemon from the folks at Alt-N Technologies.

How good is it? Well, not that long ago, Research In Motion (RIM), you know, the BlackBerry people, bought? the company.
(not positive about the change in ownership as I don’t work for the company)
During this time BlackBerry support was added. Then the market turned, and Alt-N became independent again.

I’ve been using MDaemon for many years now in several environments. I’ve tried others, but keep going back to this one. It just works. Rarely do I find a messaging problem that it doesn’t handle. You *nix fans will even like it. Although it runs on Windows machines, it has a *nix feel to it as everything is kept in files.

beans

Right Sized Project Management Toolset

I have been using Assembla now for a few years and want to give a shout out to the company for making a great product.

If you have not heard of Assembla – it is a Scrum / Kanban / Agile project management system on the web. It is cheap, with prices ranging from free for small public projects to more expensive for multi-project many user service levels. My experience has been with the $490 / year level which gets several private project spaces, a dozen users or so and quite a bit of storage. Check out the web site for current prices and plans.

Swiss Army Knife: Assembla is one stop shopping for managing a project. Features include: Tickets, CardWall, Wiki, Messages, Version Control. Really, everything you need, all in one place, accessible from every place.

Let’s take a look at some of the features in more detail.

Tickets:

Tickets or cards are the most important part of Agile project management. Because they are used so frequently – they should be quick and easy to enter. Ideally – I should be able to just mail in a ticket. Ticket priorities change frequently, so I should be able to drag and drop them. I’ve had to work with systems where entering a ticket is like filling in a tax form. Assembla has just the essentials, nothing more and nothing less. You can add fields, but it is a simple effective system without the scripting that other systems have. I like the simplicity and SPEED.

Collaboration:

Agile is all about collaboration. To me, that means everything is out there and visible to the people who need to see it. The wiki is a great place to put documentation, brainstorming, processes, standards, knowledge base articles etc. Messages encourage brainstorming and provide a stream of consciousness on a topic. Files provide a place to upload Word documents if you are into that kind of thing. You can also link to Google docs. Snippets let people comment and collaborate on a block of code. There is a StandUp tool so that if your team is distributed, you can have not real time stand up meetings. There is a Twitter feed.

Version Control:

Git, Mercurial, Perforce, Subversion, GitHub, BitBucket are all supported.

Assembla can be backed up using Amazon Backup, or you can tell the system to generate a backup set as a file you can download and archive.

There are many charts, and an API if you want to create custom reports off of the raw data.

Ticket views can be customized with filters and adding / removing fields. This is fantastic as it lets lets me get a quick and detailed view of the status of tickets.

Weak areas: The system security is not very granular. For example, you can’t give a consultant access to the source code repository without also giving her visibility into the whole project. Normally visibility is a strength, but in one case, we just wanted to give a consultant access to the repository without giving visibility into the total scope of the project. Time tracking could be improved. For example; if you make a mistake, like entering that you worked 16 hours when you meant to say 6, you can’t change it once it is saved.

Certainly for each individual tool, you could find a better tool somewhere else. However, having everything in one place, in essentially one tool, with cross link capability, Assembla has been a huge productivity boost.

Recursive SQL query

Have you ever had to do a query on a table that joins to itself to form a hierarchy? For example the employee / manager relationships where the manager has a manager up to the top level of management.

My recent case involved categories of things where the categories could be nested to any level. I needed to find the oldest parent and the youngest parent for each leaf on the tree.

The lazy way (and often the quickest) is to write a set of statements with different levels of joins, then use your knowledge of the data to pull out what you need.

But what if you want to do in a way to impress the boss?

A recursive query will do the trick.

To get started, write a fairly simple query which we will call the Anchor query. This should get back the top level (root) of information. Then you JOIN this onto another query that does the recursion.

It is a very good idea to set a limit on the recursion so you don’t bring your SQL Server down. Actually – I think it defaults to 10,000 levels of recursion. But still, better to set a reasonable limit.

Here is an example:

 with CatHeirarchy (ProductID, CategoryID, ParentCategoryID, Name1, Name2, Level, TopParentName)
 as (
 -- Anchor definition
 select PCM.ProductID, PCM.CategoryID, C.ParentCategoryID,
 cast(C.Name as nvarchar(90)) AS Name1, Cast(C.Name as nvarchar(90)) as Name2, 0 as Level,
 CAST ('' as nvarchar(90)) as TopParentName
 from Product_Category_Map PCM
 inner join Category C on C.Id = PCM.CategoryId
 inner join Product P on P.Id = PCM.ProductId
 Union ALL
 -- recursive
 select A.ProductID, A.CategoryID, R.ParentCategoryID, cast(R.Name as nvarchar(90)) as Name1,
 CAST( A.Name2 as nvarchar(90)) as Name2, Level + 1,
 A.Name1
 from CatHeirarchy as A
 Inner Join Category as R
 on A.ParentCategoryID = R.ID
 )
select distinct CategoryID, Name2, TopParentName
 from CatHeirarchy ch
 , (Select MAX(Level) AS Level, ProductID
 from CatHeirarchy
 GROUP by ProductID) maxresults
 where ch.ProductID = maxresults.ProductID
 and ch.Level = maxresults.Level
 order by TopParentName, Name2
 OPTION (Maxrecursion 30)
 GO