1/28/2008

Find duplicate rows in SQL

Filed under: Developing — Guus @ 11:54 am

Sometimes you need to know for sure that a column value is only used once in a table. Example: you don’t want to have more then 1 record with a social security number. Or maybe you are searching for a duplicate GUID (which BTW should be globally unique). Browsing by hand is not an option: the table is too large. And also the values to compare are difficult to read.

There is only 1 one way to tell for sure, use SQL:

SELECT * from <tablename> where __guid in (
    SELECT __guid
    FROM <tablename>
    GROUP BY __guid
    HAVING count(__guid) >= 2
)
2/28/2007

Cool Linux shell scripts

Filed under: Developing, Software — Guus @ 3:52 pm

I’m currently busy with creating an auto-mounting script for my mp3 files. When it’s completed, I’ll show/explain it to you. Meanwhile when googling for more info about shell programming I discovered some nice tips and tricks. Let me share it with you:

Find out which commands you use most often (a oneliner):

$ history|awk ‘{print $2}’|awk ‘BEGIN {FS=”|”} 
{print $1}’|sort|uniq -c|sort -rn|head -10

Find out top 10 directories eating up your disk space:
$ du -cks * | sort -rn | head -10

A nice starter article about shell programming can be found at LinuxFocus.
If you want to do more with the file system, this is a nice FAQ.

Unix productivity tips

1/18/2007

12 Steps to Better Code

Filed under: Developing — Guus @ 11:35 am

A very nice article about writing better code. Just test your organisation with the Joel test. Joel test? Yeah, just 12 yes/no questions. Hopefully you score 10 or higher.

  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?

In the full article there are explainations on the 12 questions. How to turn no’s into yes!

8/18/2006

Simian - When code smells bad

Filed under: Developing, Developing .NET, Developing Java — Guus @ 4:40 pm

Simian is a Similarity Analyser that detects duplications in source code (java, C#, C, C++ ASP, XML etc); once detected you can easily locate the duplication and refactor it. Simian runs natively in any .NET 1.1 or higher supported environment and on any Java 1.4 or higher virtual machine, meaning Simian can be run on just about any hardware and any operating system you can hope for.

For integrating it in VS2005, read this post from Howard: http://blogs.conchango.com/howardvanrooijen/archiv…

When you want also clickable links in the output, you can try the tool MonkeyWrangler..

Have a nice weekend!

12/14/2005

Email Design Guidelines for 2006 | Articles/Tips

Filed under: Developing — Guus @ 7:44 am

Here are some Html e-mail guidelines for 2006:

Guideline 1) Design for images being turned off
Guideline 2) Allow for the preview pane
Guideline 3) Get in your subscribers address book

The article shows you the impact and the do’s and don’ts for html e-mails.
Email Design Guidelines for 2006 | Articles/Tips - Campaign Monitor Blog

11/8/2005

Iterating over Collections in JDK 1.5

Filed under: Developing — Guus @ 7:28 pm

Iterating over a collection or array in a ugly old manner:

void process(Collection processes) {
for (Iterator
p = processes.iterator(); processes.hasNext();) {
processes.next().process();
}
}

Iterating according to JDK 1.5:

void process(Collection processes) {
for (Process p : processes) {
p.process();
}
}

This very clean !!

Source article

11/3/2005

XML editor - XML Editor & XSLT Debugger

Filed under: Developing — Guus @ 10:55 am

XML editor

A very nice XML editor is the XML editor. It is also available as a Eclipse plugin (see screenshot).

10/26/2005

PHP and the OWASP Top Ten Security Vulnerabilities

Filed under: Developing — Guus @ 6:02 pm

I foud a good page about PHP and the OWASP Top Ten Security Vulnerabilities.

The Open Web Application Security Project released a helpful document that lists what they think are the top ten security vulnerabilities in web applications.

These vulnerabilities can, of course, exist in PHP applications. Here are some tips on how to avoid them. I’ve included related links and references where relevant.

10/19/2005

Google Sitemaps

Filed under: Developing — Guus @ 1:45 pm

Google has a new tool for website developers. It’s still in beta phase, so it can still be tricky to use. This is what Google says about their new service:

Google Sitemaps is an easy way for you to help improve your coverage in the Google index. It’s a collaborative crawling system that enables you to communicate directly with Google to keep us informed of all your web pages, and when you make changes to these pages.

Google Sitemaps

Couple of days ago I installed this WordPress plugin: google-sitemaps-generator-v2-final
It automatically publishes an updated XML feed with every posting.

9/26/2005

SharePoint V3 Features

Filed under: Developing — Guus @ 3:59 pm

SharePoint2022V3.02220Features

Video:
Scoble about SharePoint Services and Workflow