IoT – Septa train checker

My latest fascination is IoT. It is obviously the next big thing. All the big guys are in it and it’s high time to get on board with it.

It all started w/ me getting to know about littleBits. And when I got to know about their cloudBit I knew there is some much I can do (or I must do).

So what did I end up doing? I created an app that checks and notifies me if my trains are running late.

Click here to read more and to get to know inner workings on this app.


IoT – Septa train checker

Microsoft Project 2013 – Exam 74-343

If you are thinking about taking your Microsoft Project 2013 certification but don’t know how and where to start, you’ve landed on the correct page.

I recently took my Exam 74-343 exam and this is how I prepared for it.


By taking the exam, not only you’ll be getting the passing credentials but also you’ll automatically be an MCP (Microsoft Certified Professional).In a business world dominated by Microsoft, I don’t need to stress the importance of having Microsoft credentials working on your benefit.

My approach to MCP was through Microsoft Project 2013. This was the right path for me as my career progress my interest towards Project management grew and this is was the right path for me.


As I narrowed in and identified my Exam 74-343 was my course of action, I first looked for professional training on the subject.

I then found ONLC. This gave me the exposure and the familiarity I needed with the MS Project software itself.

NOTE: if you are an expert user of the software you’ll be fine without the course. However, if you are a novice or an average user I recommend looking into a course as this is a software well thought out through and through. Not the product is hard to use or understand, it just simply compacts many features that you sure will need to perform your Project Management tasks.

Once that’s done registering for the exam.

Exam Registration

Depending on your location you may be eligible to take the exam online with an online proctor or you can take the exam at a designated location/provider.

I’m not experienced with online exams so in my experience taking the exam online with an online proctor could be intimidating. You are nervous enough now you have to take the exam knowing that someone is constantly watching you through a webcam and giving notices if you go off their frame for more than 3 seconds. No thank you, call me old school but if going to a location feasible I’ll take that option.

Exam Preparation

I think this is where it’s getting tricky and most probably the reason why are reading this blog post.

Before preparing for the exam, I think it’s better to get to know how and what the exam looks like and what it tests.

If you go to the Exam 74-343 page, Microsoft has done a good job explaining what it is and how it will look like. The exam is structured to test how you’ll be using MS Project in the scenario they’ve given.

Exam details : 54 questions, 150 minutes and passing score is 700.

It’s a not an exam that will test your skill on definitions or theory / principles. It’s actually an exam that tests your knowledge of the software and how you use the software to overcome the task. In other words, if you have hands on experience, you are golden.

If you think about it’s that’s true. unlike a PMP exam, this is an exam to test your skills using a software. However, that doesn’t mean you don’t need to know the theory/fundamentals. Everything it’s always good to have the background pat down.

So does that mean if you are not using the software every day you are out of luck? no not really. It sure will make it easier but by attending a course as mentioned about you’ll get the exposure and practise you need.

Also, regardless of your exposure the software something I highly recommend is doing practise exams. By doing practise exams, you’ll understand the question structure, which is important. So make sure you lots and lots of practise exams. And also don’t be surprised to find those questions and answers in the actual exam itself ;-).

Just google for sample exam questions you’ll find ample.

When I was getting ready for the exam I couldn’t find article / blog to give me some insight about the exam. I was hopeless. I was then determined that after I pass the exam I would write up my experience so that it will help some other poor soul just like I was before.

Also, if you are interested learning MS Projects full potential, take a look at the office support page. Just search for Project. You sure don’t need to know all of these in this detail but for me these articles helped me better understand some stuff that weren’t very clear from the class.

My two favourites are, Pick the right report in Project 2013 and How Project schedule tasks: Behind the scene.

Hope this provided what you were looking for. And if you are taking or thinking about taking the exam, good luck and wish you all the best.


Microsoft Project 2013 – Exam 74-343

cfgrid – variables and cfcs

The other day I was baffled with a questions of my own(not to say that it doesn’t happen to me often) but I was surprised of the solution I came up with. Alright, here we go.

Recently I was very heavily involved in cfgrids and working on some of the format changes. So what I wanted to do was pass my own variable(s) on top of the regular cfgrid(format) variables.

Question 1. How do I do that?
Then I realized some of these are NOT single values, there are more likely arrays (or String, if I may).

Question 2. How do I pass strings to cfc (because it only accepts arrays) and how to pass them thru cfgrid?

Sooooooo, after much research I found out that passing variables to a cfgrid is done as below.

<cfgrid name="gridname" ........ bind="cfc:myCFC.myFunction({cfgridpage},

cfgrid – variables and cfcs

Loop through TABLE VARIABLE in SQL

Here is a very good example of how to loop through SQL TABLE VARIABLE.

declare @RowNum int, @CustId nchar(5), @Name1 nchar(25)

select @CustId=MAX(USERID) FROM UserIDs     --start with the highest ID
Select @RowNum = Count(*) From UserIDs      --get total number of records
WHILE @RowNum > 0                          --loop until no more records
    select @Name1 = username1 from UserIDs where USERID= @CustID    --get other info from that row
    print cast(@RowNum as char(12)) + ' ' + @CustId + ' ' + @Name1  --do whatever

    select top 1 @CustId=USERID from UserIDs where USERID < @CustID order by USERID desc--get the next one
    set @RowNum = @RowNum - 1                               --decrease count

This is taken from here.

Loop through TABLE VARIABLE in SQL

SQL Stored Procedures, SQL Functions and datatype TABEL

I was working on a SQL Stored Procedure (SP) that that executes other independent functions to get the main SP to run successfully. So I immediate segregated my independent functions into SQL functions (User Defined Functions, “udf”).

Quickly I ran into some roadblocks, which then I discovered something even cooler.

Let’s start with the problem.

I wanted to handle my main query in by itself so that, maintaining it is lot simpler. So I created SQL UDF that runs the query. To make it easier I made the function return a datatype TABLE. Then my attempt was to pass that datatype TABLE as a parameter back to the main SP.  After hours of reading and figuring out how to get this done, I remember reading somewhere given that my DataBase is SQL 2005, it is not possible. (NOTE: In the same article I think I remember reading, SQL 2008 and above accepts datatype TABLE as a input parameter into a SP. Not exactly the same article but here is an article that worth reading.)

As I pointed out earlier, for obvious reasons, I’m determined to keep my main query separate but now I have to find a way to get it done.

In this case, given that this just return a query results, I settled on having a separate view table and then calling it through SP.

Inside of my SP now I would do something like this, (nothing fancy here)

SELECT TOP 10 Col1, Col2, Col3
FROM ViewTable_vw

Now with some of the query parameters are in the view, it’s not Ideal (because yes, everything is in that view but it’s not portable enough as in if I want to pass my own query parameters to this view) but it’ll get the job done

Later on, I found out that there is way of doing this which is just like the way I want (i.e. easily pass in my own parameters.)

NOTE: below example is taken from this.

First create the udf,

CREATE FUNCTION LargeOrderShippers ( @FreightParm money )
RETURNS @OrderShipperTab TABLE
    ShipperID     int,
    ShipperName   nvarchar(80),
    OrderID       int,
    ShippedDate   datetime,
    Freight       money
   INSERT @OrderShipperTab
        SELECT S.ShipperID, S.CompanyName,
               O.OrderID, O.ShippedDate, O.Freight
        FROM Shippers AS S INNER JOIN Orders AS O
              ON S.ShipperID = O.ShipVia
        WHERE O.Freight > @FreightParm

then in your SP you pass $500 as you parameter and call it as,

FROM LargeOrderShippers( $500 )

And let say for some reason, you only want the ShipperID you can do that by,

SET @sID = (SELECT ShipperID FROM LargeOrderShippers($500))

OR if you want to use SELECT

SELECT @sID = dbo.[LargeOrderShippers]($500)

Note: above I believe the dbo. and brackets (“[]”) are important in SQL 2005

I think this is very nifty, I know that I’ll be using this very often.

SQL Stored Procedures, SQL Functions and datatype TABEL

Breaking sentences more meaningfully

Often times when inserting a sentence(string) into a predefined database, we run into column character limitations.

Yes, you can use a truncate function but that end up creating meaningful sentences. Not to mention depending on where is breaks, sentence now could have words that you never want to see/display.

Let’s say sentence is, “Quick brown fox jumps over the lazy dog” and breaking at 19(i.e. getting the 19 leftmost characters), would make it “Quick brown fox jum”.

I know nothing harmful there but I think I we can be little smarter than that.

Here is what I got, and the final result will be something like, “Quick brown fox“.

Breaking sentences more meaningfully

SQL IF/CASE Statement

By now I’m sure you must have came across multiple situations, where you have to use a IF(in SQL terms CASE) condition. I know I’ve and to be honest I’m actually a big fan of it.

If you are new and want to learn about IF/CASE in SQL, I think you should first start off w/ a basic like this and then to dive into more in depth, try out this and this. These articles are well written w/ easy to follow examples.

Yesterday, I have to create an very interesting query and of course IF/CASE came to the rescue. However, this query involves little bit of calculations so after some web search, I’m glad I found this (and especially the 4th example).

SQL IF/CASE Statement

ColdFusion Casting QueryNew()

I haven’t been a big fan of QueryNew() but today I can across a scenario that could come handy.

But then, I ran into a issue that baffled me.  May be this issue has been addressed by Adobe but on ColdFusion 8, it’s a still there.

The Issue is. when the value is passed say the column type is not supported(something in that nature. I don’t remember the exact message.) But there are solutions for it.

Here is Adobe‘s workaround but as usual I wasn’t satisfied with that.

So after some more searching, I found a solution. It’s a casting issue and can be addressed by,
<cfset x = queryNew("foo,bar","integer,varchar") />

Read more from here.

ColdFusion Casting QueryNew()