Archive

Archive for the ‘General’ Category

Split Windows + Web Workbench = Win

November 27th, 2011 No comments

One of the cool features of the Web Workbench from Mindscape is the ability to generate the output files. Prior to using the Web Workbench I was using .LESS{} which uses an HTTP Handler to generate the output files for LESS.

The problem with this is sometimes I would write some CSS and not realise I missed something only to find my site doesn’t display anything, then I have to figure out what I did wrong.

With the Web Workbench, and it’s ability to generate the files every time I save, makes me less error prone.

But the most efficient way of working with it I found (when writing a lot of CSS in 1 sitting) is to split my windows so the first window has where I’m writing, and the second window has the generated CSS file.

image

If I make an error on the left side:

image

I see the error on the right.

If I make a change to the left, (added a background colour) i see the change on the right.

image

This makes it really handy when applying nested rules. Such as nesting a hover rule to an anchor tag. Sometimes I forget to include the colon.

image

Maybe in the next version of the Web Bench, Mindscape can include side-by-side windows that scroll with each other Open-mouthed smile Tho it would be difficult depending on how much CSS was generated. Would still be a nice feature.

Either way, the Web Workbench is a tool that can’t be missed.

Categories: General Tags: , ,

Website Folder Structure? CSS Files? Does anyone care? I do…

October 17th, 2011 2 comments

When we build website’s, more often than not we have: Separation of Concerns. Even if at most it’s just basic 3-tier Architecture

What annoys me though is a lot of time no one ever thinks about separation of concerns when it comes to the folder structure of their website, and where things go.

Folders

The one thing that annoys me above all else, is when ‘layout images’ (images for layout, design, styling etc) of the website, are shoved into the same folder that holds what I call “Content Images”.

For example:

root/
root/css/
root/images/

What I prefer to do is structure it so the css folder has it’s own images folder, specifically for layout images.

root/
root/css/
root/css/images/
root/images

To take it a step further, I often have images, icons, and fonts.

root/
root/css/
root/css/fonts/
root/css/icons/
root/css/images/
root/images

This way I don’t have to worry about finding specific icons in a folder full of images, I don’t have to worry about sifting through images to find ones related to the layout/design, they are all neatly tucked away in their own specific areas.

When it comes to folder structure however, NuGet gets in the way.

It would be nice if it allowed you to specify where file types should go. At the moment ‘css’ files seem to go into ‘Content’. JavaScript files go into ‘Scripts’. But what I would rather have is all lower-case names, and ‘css’ rather than ‘content’. Until then, I just download those sort of dependencies manually and create my own folder structure.

CSS

The next thing that I find annoying is the God Style Sheet. It’s the StyleSheet that people name:

Styles.css

It’s the only one that exists in the project, it’s over 100k in size, no comments, no christmas trees. Just lines and lines of fail.

The approach I used to take (before finding .LESS) was creating multiple StyleSheets that were small and easy to maintain, sometimes I would end up with up to 12, possibly more depending on the size of the website.

Each StyleSheet would be responsible for a specific task, so I would have something like the following:

/css/reset.css (this is just one of those many reset StyleSheets found on the net)
/css/layout.css
/css/main.css
/css/header.css
/css/footer.css
/css/main-navigation.css
/css/…

When sections of the website were broken down like this, it did require flicking between StyleSheets now-n-then, but they became much smaller and easier to maintain. I also became far-less at risk of Unwanted Side Effects.

Now with .LESS and LESS, it’s easy to have only a few StyleSheets, since now you can tab within a specific region and continue to write styles that only apply to that region.

For example, given a Footer element. You could come up with something like:

footer {
    border-top: 2px #182a33 solid;
    padding-top: 30px;
    nav {
        a {
            font-family: @footer-link-font;
            font-size: @footer-link-size;
            color: @footer-link-color;
            text-decoration: none;
            &:hover {
                color: @footer-link-color-hover;
                text-decoration: underline;
            }    
        }
        li > span {
            color: @footer-text-color;
            font-family: @footer-text-font;
            font-size: @footer-text-size;
        }
        h4 {
            color: @footer-heading-color;
            font-family: @footer-heading-font;
            font-size: @footer-heading-size;
            font-weight: bold;
            margin-bottom: 35px;
            padding-top: 17px;
        }
        > ul > li {
            width: 165px;
            float: left;
            display: block;
            line-height: 18px;
        }
    }
}

This would in turn generate the following CSS for you.

footer {
  border-top: 2px #182a33 solid;
  padding-top: 30px;
}
footer nav a {
  font-family: arial;
  font-size: 12px;
  color: #00adee;
  text-decoration: none;
}
footer nav a:hover {
  color: #00adee;
  text-decoration: underline;
}
footer nav li > span {
  color: #a8a8a8;
  font-family: arial;
  font-size: 12px;
}
footer nav h4 {
  color: white;
  font-family: arial;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 35px;
  padding-top: 17px;
}
footer nav > ul > li {
  width: 165px;
  float: left;
  display: block;
  line-height: 18px;
}

I find it much easier to manage writing ‘LESS’ then traditional CSS.

Conclusion

I didn’t want to go into too much detail, my main point is I think people should put a little more thought into how they structure their folders, files, naming, etc when creating websites. We focus so much time on trying to main our applications and code maintainable, but somehow neglect the website itself, and after a while we just end up fighting with it.

Career Starting Salary

March 28th, 2011 No comments

Every now-n-then I read threads on forums to do with pay & salary in the IT industry, and it always frustrates me when I come across posts where people are whinging about junior / no experience jobs being offered for ‘low pay’.

The latest thread can be seen here: http://forums.whirlpool.net.au/forum-replies.cfm?t=1657193

In the thread the original poster was complaining about a job ad being advertised at 35-40k, for a grad position. It seems that a lot of people agree with him. Some of the comments are:

35k is shockingly low. You could walk out and get an office job with no training and no stress for that amount. As a grad you will have to be learning things in your spare time etc.

In IT you need to be good to get good money. If that”s not you then change your career, plenty of industries where you get good money even if you are just average or worse…

I still think it”s dangerous practice to offer an absolutely disgraceful salary like $35k to gradutes

35k is a a stupid sallary for a new Grad in this day and age. Heck, as a grad I would even consider 50k too low. Good luck trying to fill that role !!

And one of my favourites:

$35k is terrible… what”s the point of going to uni and graduating with a degree if 35k is all you get.. u might as well get a basic admin job that pays $40-50k…

That”s just a few of the comments from the first 4 pages of 19+ pages.

I don’t understand how people find this low, I don’t know how things work in America, but in Australia and New Zealand a grad student in IT simply cannot expect to work out of Uni and into a 100k job.

When I started working about 7 years ago at 18, I started on 35k. (for the record I never went to university, I did a couple of diplomas then started working).

I was discussing this with a good friend of mine, last night and he told me he started on $10.30/hr (about 21k), without asking him I bet he would say it was worth it, he’s very experienced and works for a great company.

I just don’t think grad students or ‘tafe(as it’s called in Australia) have the knowledge to sit down at a desk and cut code, you need to mentor them and hold their hand.

That’s not to say ALL grad/tafe students need to have their hand held, you may end up with someone like Mark Zuckerberg, but those types of people are different, Mark was doing programming in the 90’s when his father taught him BASIC.

I think the problem stems from the fact a lot of people get into programming because they think it’s easy money, sure with ~10 years experience and good references you can get 100k+, but you just don’t walk out of Uni or Tafe into that sort of money. Programming is more of a hobby than a career, it’s something you do because your passionate about it, not because you want to get paid lots. After you’ve been in the industry for… 15+ years? Then you can worry about being paid lots, but prior to that, should be happy you’re doing something you love.

I think 35k is justified because it actually costs the company you’re working for, to mentor you, and hold your hand for at-least the first year of your career.

After a year it’s easy to move up the food chain, that first year is the hardest to find a job, and I think it’s selfish to whinge for low pay, when an employer can’t rely on you to get a task done without asking a billion questions.

The excuse that you can get an admin job for 40-50k is silly, after a few years in such a role, you’re still going to be doing the same old boring shit, at least as a programmer you’re going to move up onto bigger and better projects, harder problems to solve, and what you seem to crave so much… more money.

</rant>

Categories: General, Rant Tags: ,

Blog Update to WordPress w/ SqlSrv

December 28th, 2010 Comments off

Over the past few days I’ve moved my blog from BlogEngine.Net to WordPress, since BlogEngine is fail.

I didn’t go with a hosted solution since it costs money just to use my own domain name, infact it costs more to use my own domain name than it cost me to register the damn thing. So I investigated blogs and came across:

http://wordpress.visitmix.com/development/installing-wordpress-on-sql-server

Seems someone or somepeople have ported wordpress to work on SQL Server, so people who are on Windows with SQL Server and don’t want to use FailSQL MySQL can take advantage of wordpress.

As much as I hate PHP after moving to .Net, the one thing the PHP community did right was all the different CMS and Blog solutions out there, something the .Net community lacks. As far as I’m concerned there is not one good .Net blogging solution available.

Anyway so far I’m happy with the move. Smile

Categories: General Tags: , ,