Archive for Academic
Create Gantt charts in Excel
Posted by: | CommentsI currently have a requirement to produce a Gantt chart for a training project I am involved in. Whenever I think Gantt charts, I think MS Project. In this case however, I have been asked specifically not to deliver the chart using MS Project as the recipient (1) does not own a copy, (2) considers MS Project too complex and (3) considers it overkill for the job in hand.
I have come across a great little solution that involves tricking Excel into thinking that its Stacked Bar charts are in fact Gantt charts. Many thanks to R. Philips and Youtube for this.
Globenet
Posted by: | CommentsAs some may have recited to their priests in the past, forgive me reader for its been a while since my last post. I have either been very lazy or very busy – you decide. Anyhow, it is great to be past Christmas/NY and back to normal. We have started lectures this week at UCG. Yesterday we attended the first Computer Comms lecture of the semester with our master of ceremonies Dr Andy Shearer. During his presentation he showed us an interesting map of the Internet from a backbone hub perspective. We actually viewed two maps, one from 10 years ago and one from 2007. I found them fascinating and so have decided to post a brief article on them so you can see for yourselves.
The first image shows the Internet backbone network as it stood in 2007. You can clearly define North America and Western Europe. Other jurisdictions are identifiable by a thin concentration of hubs on their borders / perimeters (South America, Africa etc). What strikes me about this map is that it clearly shows the great divide between those who are connected and those who are not. The open western capitalist economies vary vastly from the developing and communist states. As per usual, click the images for bigger and better.
The next image below, shows the main European city to city connections. Again you can make out the shape of Europe. Squint your eyes if you don’t believe me. The main proliferation of trunks seem to exist between the UK and France/Germany. Ireland seems well connected in terms of these main trunks, if only we could sort out the last mile.
Finally the same map of North America. Again I would argue that you can make out the shape of the states. For more information on these images and research into Internet mapping, visit the Dimes project here.
Visual Studio 2010
Posted by: | CommentsI wrote some articles and recorded some training videos earlier this year demonstrating some of the new features of Visual Studio 2008. Seems like only a few weeks ago but already I am reading about the forthcoming Visual Studio 2010. BTW, Having dome some research for an essay on Parallel Computing at NUIG, I read somewhere that one of the buzz words for the new version of the IDE is parallelism. Microsoft have already addressed this with Multi Threading and are probably streets ahead of anyone else with this. People in the know advise that the new family of development tools will be built specifically to address the new so called “crises in computing”.
Anyway, if you cannot wait, MS have released a VS2010 training pack. So point your browsers on over here and download a relatively small 26.5MB exe.
From the MS Download page . . .
The Visual Studio 2010 and .NET Framework 4.0 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including: C# 4.0, Visual Basic 10, F#, Parallel Computing Platform, WCF, WF, WPF, ASP.NET AJAX 4.0, ASP.NET MVC Dynamic Data.
Kayaking at NUIG
Posted by: | CommentsAs soon as I got the chance, I joined the Kayak club at NUIG. The college has water everywhere, the Corrib and the canals flow right through it so you can imagine water sports are a big deal. Kayaking is fun but also pretty serious because it often involves running white water or big water in general. So there is a training regime for beginners. We go out on the canals or the river every week with instructors. We have already gone through the capsize drill which is a routine for escaping the Kayak upon capsize (which happens very often….to me anyway’s). Last week we did a pier entry whereby we launched off a pier at about a five foot drop. Pure exhilaration, so much fun. On Saturday morning we ran a small waterfall. The pictures below are of Friday’s session and are not mine so credit to the original photographer.
Coming up in the next few beginners sessions, we have a launch off one of the canal bridges and I think we get to run the Corrib right down through the centre of Galway. That’s scaring me a bit, that river is a big fast torrent.
The feeling going over that mill, is amazing. Of course I got it wrong first time, I went completely sideways but managed to perform a brace with my paddle to prevent myself from capsizing when I went over which was the fluke of the month but it must-a looked impressive eh?
The curse of the lazy rollover
Posted by: | CommentsBeen messing around with web design and css now for a few years. In that time I have encountered many problems and issues. The fixes are often ill thought out and may apply to one browser or even one version of one browser but not another.
The the issue of rollover images as a beaming example. On this web page, I have a navigation bar above, when you place the mouse over any button, you notice the background changing colour. That is typically done by loading a different image during the mouse over event using css. The problem here is that there is no browser call to the second image until the user actually places the mouse pointer onto a navbar button. Only then is the second rollover image called by the browser and until it initially loads, the user experiences a slight delay that gives the appearance of sluggishness or a non responsive web site layout. The fix for this is to use some method to pre-load the rollover image when the page loads so that it is there, in memory, ready to respond immediately to a user mouse over event.
There are loads of ways of achieving this pre-load but they all have their advantages and disadvantages. The most common way is to use javascript. But what if the user has javascript disabled on their browser ?
You can use css but the traditional methods are ugly. For example, a common css method is to create a div, set it’s position to some huge minus figure and load the rollover image as it’s foreground or background or some href attribute or what have you. The fact that the div has a location of -1000px / 1000px hides it (hopefully) from the user. This is the sort of thing that programmers (at least honest to decent programmers) absolutely hate. Ahh the never ending search for the ‘elegant’ solution.
Here’s my solution to this age old problem
Instead of using 2 or even three images for the navigation bar, use just one! Bolt the images together into one long image and then simply use css to change the position of the image when the relevant mouse over, visited or what have you effect is required. In the bad old days, my menu above would have had 2 images as follows.
| navlink.png | navhover.png |
and my css would have looked something like this
#nav a, #nav a:visited {
background-image: url(‘images/navlink.png’)
. . . . .
}
#nav a:hover {
background-image: url(‘images/navhover.png’)
. . . .
}
Now lets consider amalgamating the images into one. What about the following image.
| navlink_hover.png |
Here, I have joined the two images into one larger image. This image gets loaded with my web page, and when I want to implement the mouse over (hover) effect, I simply use css to change the position of this image in the div or whatever container it happens to reside in. The following css does this beautifully.
#nav a, #nav a:visited {
background-image: url(‘images/navlink_hover.png’) right;
. . . . .
}
#nav a:hover {
background-position: 600px;
. . . . .
}
In the first style, I use “background-image: url(…) right; To right align the image in its container. Then in the hover style, I move the image 600px (the width of one transition within the image or half the image width). The effect to the user is to have instant responsive rollover effects making the site look and feel professional or at least somewhat decent. You could also have a 3 part image and move / offset it an appropriate distance for each of the styles a, hover and visited.
Might go to University
Posted by: | Comments
I got my exam results on 25th June and was happy with a first class honours. So I now have a BSc (Hons) in Computing. Four or five years ago when I was considering going back into education, I made a promise to myself that if it worked out well and if I did well enough, then I would strive to achieve a Masters in my chosen field. So now that I have graduated from IT Sligo, I have been humming and hawing about what I should do. I had been talking to IT departments in Uni’s around Ireland all year looking for a course or research opportunity that suited.
I finally found a 2 year taught/research Masters in NUIG. The MSc in Information Technology (M.I.T) seems right up my street. I liked the brochure so much that I went to NUIG and met with Pat Byrne there. She was so kind and helpful and gave me great insight into this course and life as a 4th level student in general. So I have completed my PAC application (albeit late) for this course. I still have not set this in stone but I need to start making some kind of decision on my future. Completing this application gives me a focus. I have to admit though that I kinda have my heart set on this so it’s probably going to happen.
phpMyAdmin DB Import script
Posted by: | CommentsAfter the catastrophe of my site being deleted, I am slowly but surely getting stuff back online. Today I decided to tackle the Photo gallery. It’s powered by a script called gallery2 available here and it stores it’s data in a MySql back end. So luckily I had a backup of the gallery and a MySql data export script.
The problems arise when you try to import a large script file into MySql over a web interface. Usually you run into a time out or a memory overload error as dictated by the hosts php settings in php.ini. After much searching though, I came across a fantastic script called BigDump.
BigDump carries out staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped. It also presents a reasonable representation of a status GUI letting the user know the current progress of a data import.
Using the script is very easy.
- Open BigDump in a text editor and adjust the database configuration
- Drop the old tables on the target database if your dump doesn’t contain “DROP TABLE” (use phpMyAdmin)
- Create the working directory (e.g. dump) on your web-server
- If you want to upload the dump files directly from the web-browser give the scripts writing permissions on the working directory (e.g. make chmod 777 on a Linux based system). You can upload the dump files from the browser up to the size limit set by the current PHP configuration of the web-server. Alternatively you can upload any files via FTP.
- Upload bigdump.php and the dump files (*.sql or *.gz) via FTP to the working directory (take care of TEXT mode upload for bigdump.php and dump.sql but BINARY mode for dump.gz if uploading from MS Windows).
- Run the bigdump.php from your browser via URL like
http://www.yourdomain.com/dump/bigdump.php. Now you can select the file to be imported from the listing of your working directory. - BigDump will start every next import session automatically if you enable the JavaScript in your browser.
- Relax and wait for the script to finish. Do not close the browser window!
- IMPORTANT: Remove bigdump.php and your dump files from your server
Running the script initially, presents this screen where a user can upload a sql import file or select an existing file to import into MySql.
The import progress page. Once you run the script, this page is displayed, it updates every few minutes. Give it plenty of time.
Lambda Expressions in C#
Posted by: | CommentsLambda Expressions are new to C# from .Net 3.0 onwards. Their syntax often confuses those who come across them for the first time. In this video I take a look at them in their simplest form and do a comparison between using Lambda expressions versus using inline anonymous functions. Lambda expressions borrow somewhat from functional programming syntax and even logic and that may be part of the confusion.
The Lambda operator is =>
It can be called, “becomes” or “goes to” or “such that”. There is some debate out there as to how we should refer to it but I guess you could use all the phrases I mention depending on the context of your expression statement. Lambda types can be explicit or implicit. Again type inference leads to strongly typed objects that support full intellisense and type-safe attributes.
| Author: | Kieran Stafford (2008) |
| Video: | Lambda Expressions in C# (.Net 3.0+) |
| Running time: | 8 minutes |
| File size: | 14MB |
| Download: | Here |
Using LINQ in .Net with Visual Studio 2008
Posted by: | CommentsIn this video, I explore some of the possibilities of Language Integrated Query or LINQ which is one of the most talked about features to be added to .net 3.0 +. I will go through two examples of using LINQ, I start off with using it to query data held in memory from a simple array of integers. I then go on to demonstrate a classic scenario of using LINQ to query data from a Sql Server database (the famous Northwind db in this case).
During the course of this video, I touch briefly upon Lambda expressions, another new concept to c# from .Net 3.0 onwards. Lambda expressions delve somewhat into functional or declarative programming and as such can be confusing to some. So with that in mind it is probably beneficial to do the next video on them. I will try to keep it succinct, simple and as obvious as I can. Stay tuned.
I hope to keep this forum going and add a new tutorial video fairly regularly so please visit often for updates. Again - I’d very much appreciate it if you would take the time to register as a member of this forum if you haven’t already done so and post some feedback on these videos. Where they good? bad? useful? accurate? helpful?, Can I do anything to improve them etc.
I have now fixed the bug whereby the intellisense popups were being omitted from the video. Also note that I have recorded this video at a screen resolution of 800×600 and then rendered the final wmv at the same size so the quality in this video is excellent. Try this video zoomed at 100% or even at full screen to get the best viewing experience.
| Author: | Kieran Stafford (2008) |
| Video: | Using LINQ (language integrated query) in .Net with Visual Studio 2008 |
| Running time: | 24 minutes |
| File size: | 25MB |
| Download: | Here |
Thanks to Ronan Geraghty from Microsoft for pointing out that LINQ is introduced in .NET 3.5 rather than .NET 3.0 so please forgive my mistake in the video.
C# 3.0 New language features in Visual Studio 2008
Posted by: | CommentsThis is the first in a series of videos that I intend to create to coincide with the up coming launch of Visual Studio 2008. In this video I will take an in depth look and explain the following as best I can.
- Auto properties
- Object Initializers
- Collection Initializers
- Extension methods
- The "var" keyword
I shall be adding more videos over the coming days to talk about some of the key new addons in VS2008 such as LINQ, Multi platform targeting, The IDE interface etc. I’d very much appreciate it if you would take the time to register as a member of this forum and post some feedback on these videos. Where they good? bad? useful? accurate? helpful?, Can I do anything to improve them etc. Try this video zoomed at 200% or even at full screen to get the best viewing experience.
| Author: | Kieran Stafford (2008) |
| Video: | New language features in VS 2008 (.Net 3.0 onwards)Download |
| Running time: | 16 minutes |
| File size: | 20MB |
| Download: | Here |