Web Development Web Links

Beautiful parallax effects

Parallax effects on webpages can be awesome if done well.   I’m still pretty new to js and web development in the grand scheme of things, so haven’t figured out how to do them yet (I will though), but I think they’re very cool.

parallax

Parallax.js by Matthew Wagerfield is a ‘simple, lightweight parallax engine that reacts to the orientation of a smart device’, and, based on the demo here, it’s pretty impressive.  The graphics and animation used are beautiful and if you run it on your iPad or iPhone and move it about, the effects are pretty spectacular.  Do follow the link, as the picture above doesn’t do justice.  If you don’t have a mobile device you can move your mouse about to get an idea of the kind of effects you’ll get with motion.  It kind of reminds me of the effects in Little Big Planet.

I’d love to put something together like this one day.  The project GitHub page is here.

Development Internet

Making the jump from Classic ASP to ASP.Net – Which language to choose?

I’ve been developing using some flavour of VB/VBA/VBScript for about ten years, and I’m very used to the way it works, but I’m realising it’s time to move on.  Technologies have changed, and even though my Classic ASP applications perform perfectly well, they don’t fit in with the direction my organisation wants to move in.  I’ve been putting things off way too long, and it’s time I moved on, too, before I find myself way too behind the times.

So, with that in mind, I’ve explored a little and found I have two options (from a Microsoft and ASP.Net point of view) – to go with VB.NET or shift over to C#.  In this article I want to discuss my decision and why I came to it.

Coming from a generally VB-based background, the obvious draw for me is to move across to VB.Net.  I know it’s nothing like what I’m used to, but it’s pretty close and probably not that much of a learning curve (apart from being better at OOP stuff), but is it the right decision to make?

Turns out it possibly isn’t.

Do a search on StackOverflow.com for questions asked about C# and VB.Net and here’s what you get:-

csharp

for C#, as opposed to a similar search for VB.Net:-

vbnet

Wow.  I mean, wow…  That’s ten times the amount of questions about C# than about VB.Net.  Now, what does that mean?  Does it mean C# is ten times more difficult than good ol’ VB?  I don’t think so.  Look at the amount of followers for each.  Here’s the number of followers on StackOverflow for C#:-

csharpfollows

And here’s the same statistic for VB.Net:-

vbnetfollows

Again, ten times the number of C# followers.  To me that says how many people are interested in the technology and want to read about it.

I decided to do more research, so I jumped to GitHub and looked at their language specific pages.  I started with C#.  It’s worth noting here that on the languages pages it doesn’t mention the number of repositories, but it does tell you where the chosen language sits in terms of popularity.  I digress, here is the result for C#:-

c#git

And here’s the result for VB (unfortunately, Github doesn’t seem to split VB into sub-languages, but in this case it doesn’t matter):-

vbgitHmmm…speaks for itself again, doesn’t it?  Let’s try something else though, as I’m still not convinced.  What jobs are out there?  I opted to look at Monster.co.uk and search for both ‘C#’ and ‘vb.net’.  Here’s what I got for C#:-

c#jobs

And for VB.Net?

vbjobs

Finally, following a search on programmer salaries, I came across a very simple looking search on Indeed.com where you can search by keyword and you get an average salary (in dollars) for jobs matching that keyword.  I couldn’t resist.  Here’s the result for c#:-

csharpsalary

and the salary for VB.Net:-

vbnetsalary

Not a massive difference, but the results still speak for themselves, I think.

Still not completely convinced about the overwhelming evidence provided to me by my ‘scientific’ research, I spoke to a seasoned developer colleague of mine yesterday and asked him which I should go for, and his reaction was along the lines of “you know how Classic ASP is now?  That’s what VB.Net will be in about 5 years..”.

Now I know that might be a somewhat subjective statement (the  guy develops using C#), but I got the point…

Based on these findings, I’ve decided to try to learn C#.  From both a personal and professional standpoint, I think it’s the right thing to do. I know it’s going to be a challenge,  especially moving from a scripting/procedural language like VBScript to a more Object Oriented language such as C#.

I’ve started today, and hope to post more on my experiences as I go on.

I’d be interested to see what you guys think about my decision, and my rather non-scientific methodologies in reaching that decision.  I’m also aware there are other web technologies out there, but my hand is somewhat forced by the organisation I’m working in.  I still intend to learn some PHP at some point, but not yet.

SQL

SQL Server: How to change the schema for a table

I was moving a few tables around in SQL server 2008 today (hence my earlier post about wanting to list everything), and wanted to organise things a little better, so I decided to move some of my tables to different schemas.

Here’s how I did it:-

ALTER SCHEMA newSchema TRANSFER dbo.theTable

This would transfer dbo.theTable to newSchema.theTable. Another handy little trick. Make sure the schema you are moving your table to (in my example ‘newSchema’) exists first though, or you’ll get errors.

SQL

SQL Server: A query to list table and schema names from a database

Earlier today I needed a list of all schemas and their tables in one of my SQL server 2008 databases.  After a bit of searching around and figuring things out I managed to put this together:-

USE [your database name here];

SELECT
    schemas.name [Schema name],
sysobjects.name [Table name]
FROM sysobjects
    INNER JOIN sys.schemas
        ON sysobjects.uid = sys.schemas.schema_id
WHERE xtype='U'
ORDER BY [Schema name], [Table name]

Not sure if it’s the best way of going about things, but it certainly seemed to do exactly what I wanted. Any comments or easier ways of doing this, maybe?