StructureCMS

June 30, 2011

Telstra wireless broadband – lessons learned

Filed under: Technology — joel.cass @ 8:16 am

Telstra sucks. It’s a well-known fact and while I’ve avoided being a customer of theirs for the last 10 years or so, I’ve been having a lot of trouble getting coverage from my Vodafone wireless broadband service. So, I walked into a Telstra store, purchased a prepaid Internet router (Telstra Elite) from the reluctant staff member who then proceeded to take copies of my driver’s licence (don’t know why since I had to fill in all the details all over again), opened the package, read the instructions, it all seemed so ’simple’.

Yet, when I actually try using the thing it doesn’t work. First things first, the card provided with the modem says you can be connected in *just* 3 simple steps! Wrong! The manual actually mentions (on an left-sided page with no headings) that you have to actually activate the modem by calling a number. Simple.

I call the number. Automated message tells me I should go online, after all, it’s “quick and easy”(!). I hate automated phone services, so I decided to go online. Fill out all my details and then, theoretically, my modem should be activated in the next two hours. The next morning I try to connect (about 12 hours later). I still can’t connect.

I check the modem settings. Fine, no problem there. The connection between my laptop and the modem is very fast. I click on the ‘check your account’ link. It loads! Oh, I have zero credit. But what about the 5GB included with the modem? It looks like I’ll need to buy credit before I can use my ‘bonus’ credit. Fucking Telstra!!!

So I give the call centre a call. Following the prompts, got there eventually. I was served by someone named ‘Joy’ – oh the irony. After resetting my modem, and resetting the computer (she asked me if it was ‘XP or Vista’ – ha it’s a Mac!), everything just magically worked.

I refreshed the ‘My Account’ page – miraculously a dollar was added to my credit! And everything just seemed to work!

Two hours later I check to see if it’s still working. Nope. Broken again. I refresh the ‘My Account’ screen. Zero credit again!

I call up again, this time I am greeted by Mark. He starts rolling out the normal questions, asking me to reboot my computer etc etc. Check the SIM card, fine, fine, fine… Then he realises my account was set up as a mobile phone account!

The whole problem was that I used the Internet to enable my prepaid broadband service – it can only be enabled over the phone. Hence, they don’t mention the Internet in the manual – however, the greeting when calling to activate the account starts off by recommending that you go online to enable your account, after all, it’s “quick and easy”! It was neither quick, nor easy, in fact, it was painful!

What I can’t stand about Telstra’s approach is how many times the words ’simply’, ‘easily’, and ‘just’ were mentioned in their documentation and on the prerecorded phone messages – not only is it patronising but it’s an outright lie! The documentation should read as follows:

You can set up your modem in 7 easy steps!

  1. Simply crack your nails trying to open the back shell of the modem. Easily realise that isn’t working, and then just use the corner of a credit card to crack the shell open.
  2. Simply insert the battery into the back of the modem so that the contacts meet the pins (which aren’t gold by the way).
  3. Put the blue card that came with your modem in front of you. Turn on your computer, and set up a new wireless network. Select the network name entered on the card and enter your WPA password.
  4. 4. Simply open up a web browser and realise nothing is working. Open a new window and enter ‘http://192.168.0.1′ into the address bar – a page should load up immediately. This confirms that you have your network set up correctly.
  5. Call 125 8887 and follow the prompts to activate your card. DO NOT go on the Internet to activate the card.
  6. Simply Wait 2 hours
  7. Check to see if your account works. If not, call 125 8887 and simply follow the prompts (4, 2, 1). Consult your friend at the other end of the line.
  8. Repeat step 7 as many times as necessary. Step 6 may be necessary as well.

But this will never be a reality. Telstra seem to assume that their customers cannot count past 3 and also, the process is not ’simple’ nor is it ‘quick’ and ‘easy’.

Great network, poor systems, and a workforce that knows nothing about the customer. Enter Telstra. And people wonder why their shares don’t get good returns.

May 24, 2011

The Great Hunter Cycling Classic

Filed under: Cycling — joel.cass @ 8:22 am

The Great Hunter Cycling Classic (or the all spokes festival as it is also known by) is a series of races held in the Hunter Valley, first a criterium on Saturday, then a 60 or 100 kilometre race held on Sunday. This was my first time at this race, and also the third race I had signed up for. Being as dumb and naive as I were, I decided I could do the 100km race. After all, I’ve done many 100km rides without issue, I should be able to hold my own. At least that’s what I was thinking…

I missed the criteriums, mainly because I don’t have the right license, but arrived on Sunday morning for registration and warm-up. Registration was easy; however pinning the numbers on took more time than it should
have. By 7:50 I was ready for warm-ups, which gave me barely 15 minutes. I still felt lethargic from the night before and the lack of a hearty breakfast.

Being such a long race, I was expecting it to start softly and then go from there. It was quite the opposite. As soon as the start was announced, everyone took off. The pace soon lifted to around 50km/h. Then it lifted again. I could feel my legs already, I was not prepared for such a start. After trying to hold on for about 10km the peloton started creeping away. And after the second hill I knew I could not catch them no more.

So I resigned to a recovery pace for a while, sticking it to around 30-35km/h. A few more hills and a couple of corners later I was passed by another group. I tacked onto the back of them and found their pace a lot more comfortable, sitting between 35-40km/h.

The next thing I didn’t see coming was the straight leading up the the finish line. The were more potholes on the road then there were bitumen. Just one awful patch-up job after the next. Going over these sections at 40km/h could be likened to sitting on top of an out of control machine gun. The bike was going everywhere. I dropped my chain at least once.. Lucky it was on the big ring.

The first lap was done and it was onto the second. Now the group had gotten a rhythm and everyone was humming along rather well. More hills, more potholes, and then another lap of the same. By the end of the fourth lap I could really feel my legs. Furthermore, the group was starting to pick up given that the final lap was around the corner.

In my mind, I fell as if my body had almost resigned that the last lap was a cool-down session, as soon as I passed the line everything just caved in. At the first hill my legs cramped up, one started working against the other. Things started getting a bit blurry and I found myself in a world of pain. I drank some water – it tasted like domestos – why did I have to fill my bottles at the hotel? Soon I saw my group fade into the distance. Then I was on my own.

It was a struggle. My legs aching, my chest sore, nothing top do but find a gear where I could sit comfortably at 90rpm and forget any chances of winning or even doing well. What was I thinking that I even had a chance? These guys were way too fast, and furthermore all my 100k rides have had breaks in them.

Soon it became a matter of mind versus body. Things were shutting down left right and centre. I started getting tunnel vision. My legs weren’t getting any better. I kept my eyes on the speedo. “90rpm”, I remind
myself, “keep it at 90rpm” – the hills came and I was out of gears. “Out of gears on a 6% incline? What’s wrong with you?” things start getting nasty and every antagonistic, anxiety-inducing thought comes out to play. Then it turns to “that bank on the left looks nice, lets get some sleep”, or just plain “ow, ow, ow, ow, ow”…

Finally the last corner comes in. I pass one guy that was obviously in the same world of pain I was. We shouted some encouraging words back at each other but soon lost touch. The potholes come around again and it’s almost as if my legs had come back to life – perhaps it were the bumps triggering some sort of adrenalin rush, or just that my legs had recovered whilst riding at snail pace.

I was counting the hills to the finish line, 3… 2… 1… The finish line was in sight – before I knew it, the 500m sign past, then 200m, 100m and then all I could hear were gears grinding – in the last 100m a group of riders passes. Where were they before? At any rate I placed somewhere in the middle of them and the race was over. And strangely I did not feel tired, exhausted, nor exhilarated. Just plain relaxed that it was all over. I guess I found my limits and experienced phenomenon I had only read about, in the end I was glad just to have finished.

It pays to set goals. My goals started out ambitious – “keep up with the group”, “try some tactics”, “have a good sprint at the finish”… It soon changed to “finish the race”, “don’t pass out”, “don’t throw up”… Funny how things change on the day and I always find myself short of preparation.

In the end it was a good ride, the scenery was excellent, the weather perfect, and even though there was a lot of pain, I had learned a lot about my limits. And I actually came out of the race feeling good, like it was all just one big workout. A coffee, a little bit of food and it was time to head back to the big smoke to recover whatever was left of the weekend.

February 9, 2011

Retrieving HTTP URLs in PHP

Filed under: PHP — joel.cass @ 9:32 am

It’s strange how many different ways there are to do the same thing in PHP. For example,if you want to retrieve a URL, it can be as easy as calling file_get_contents($url), or you can use the PECL libraries, or you can go dig up an open source project such as this one.

I was messing around one night and figured it would be possible to just run an http request over a socket. As it turns out it’s not so difficult, there is tons of information out there on how to do it and it wasn’t long before I had a method figured out.

The advantage of this is that it is lightweight and gives you some control over the headers (etc) that you want to send/receive. This has only been tested on text-only requests.

function get_http_content ($url, $timeout = 3, $headers = array()) {
	// initialise return variable
	$stcReturn = array("headers"=>array(), "content"=>"");

	// get server name, port, path from URL
	$strRegex = "/^(http[s]?)\:\/\/([^\:\/]+)[\:]?([0-9]*)(.*)$/";
	$strServer = preg_replace($strRegex,"$2",$url);
	$strPath = preg_replace($strRegex,"$4",$url);
	$numPort = preg_replace($strRegex,"$3",$url);
	if ($numPort == "") {
		if (preg_replace($strRegex,"$1",$url) == "https") {
			$stcReturn["headers"]["Status-Code"] = "0";
			$stcReturn["headers"]["Status"] = "HTTPS is not supported";
			$stcReturn["content"] = "Error: HTTPS is not supported";
		} else {
			$numPort = 80;
		}
	}

	// connect to server, run request
	$objSocket = fsockopen($strServer, $numPort, $numError, $strError, $timeout);
	if (!$objSocket) {
		// connection not possible
		$stcReturn["headers"]["Status-Code"] = $numError;
		$stcReturn["headers"]["Status"] = $strError;
		$stcReturn["content"] = "Error: {$strError} ({$numError})";
	} else {
		// connection made - send headers
		$strOut = "GET {$strPath} HTTP/1.1\r\n";
		$strOut .= "Host: {$strServer}\r\n";
		$strOut .= "Connection: Close\r\n";
		foreach ($headers as $strName=>$strValue) {
		$strOut .= "$strName: $strValue\r\n";
	}
	$strOut .= "\r\n";
	// get data
	fwrite($objSocket, $strOut);
	$strIn = "";
	while (!feof($objSocket)) {
		$strIn .= fgets($objSocket, 128);
	}
	fclose($objSocket);

	// split data into lines
	$aryIn = explode("\r\n", $strIn);

	// data is split into headers/content by double CR
	$bHeader = true;
		foreach ($aryIn as $i=>$strLine) {
			if ($i == 0) {
				// first line is [protocol] [status code] [status]
				$stcReturn["headers"]["Protocol"] = preg_replace("/^([^ ]+) ([^ ]+) (.+)$/", "$1", $strLine);
				$stcReturn["headers"]["Status-Code"] = preg_replace("/^([^ ]+) ([^ ]+) (.+)$/", "$2", $strLine);
				$stcReturn["headers"]["Status"] = preg_replace("/^([^ ]+) ([^ ]+) (.+)$/", "$3", $strLine);
			} elseif ($bHeader && $strLine == "") {
				// if line is empty headers have ended
				$bHeader = false;
			} elseif ($bHeader) {
				// set header
				$stcReturn["headers"][preg_replace("/^([^\:]+)\:[ ]*(.+)$/", "$1", $strLine)] = preg_replace("/^([^\:]+)\:[ ]*(.+)$/", "$2", $strLine);
			} else {
				// set content
				$stcReturn["content"] .= $strLine;
				if ($i < count($aryIn)-1) {
					$stcReturn["content"] .= "\r\n";
				}
			}
		}
	}
	return $stcReturn;
}

January 4, 2011

Cycling in Jervis bay

Filed under: Cycling — joel.cass @ 11:52 am

This new years’ break was spent at the beautiful Hyams Beach in Jervis Bay NSW. Whilst the weather was not fantastic (apart from a few days thankfully), the cold and cloudy mornings allowed me to get some cycling time in. I had decided to take the commuter bike down the coast as it is an MTB, even though it had the slicks fitted it could still be taken off-road.

It’s strange that so many people do not consider Jervis bay as a cycling destination. At least in the early morning, the roads are rather quiet, there is no shortage of wildlife to see, and whilst there are many hills most of them are mild and rolling. There were many times that I would be the only one on the road – only the hum of the tyres and the birds’ calls filled the air. No traffic. No pedestrians. No pollution.

It was not long before I found a good route to take. The Shoalhaven city council has listed numerous rides on their website, the most appropriate ride I found was ride A15 – this ride is probably the closest to the Hyams Beach and did not involve riding on the beach at low tide (unfortunately it was always high tide whenever I wanted to ride). The A15 ride took in views of the Basin and also of the country around the Jervis bay area. And back along the urban tourist drive for good measure.

I had seen on google maps that there were tracks leading from the Vincentia golf club through the bush to Hyams beach. I decided to take this route and it was quite rewarding. Even though the MTB had the Schwalbe Kojak slicks fitted they handled well, although they did get a bit ‘taily’ in the sandy areas. They were excellent on the gravel and rocks, and even held their own in muddy areas, surprisingly. The last 2km or so leading down to the beach was almost entirely downhill, allowing the bike to pick up some speed and for me to test out the tyres. They did well, though packing for home it was obvious why the manufacturer did not recommend them for off-road use – there were many abrasions on the sidewalls, but no cuts (I wish road tyres were made that well).

I have posted two rides to bikely.com:

  • Road Loop, a basic ride on the road
  • MTB Loop, including a tour of Sanctuary Bay and the off-road portion after the golf course

Here’s some photos I took on the ride. As you can see, there is quite some nice scenery and wildlife (I did actually ride straight past that Kangaroo but was too wimpy to get close to it later to take a photo).

Sunrise from Sanctuary bay

Kangaroo at Sanctuary bay

Scenic Valley after Tomerong (It's not as steep as you think)

The view from Greenfields beach

Lookout point between Greenfields and Chinamans Beach

December 7, 2010

Configuring ColdFusion to have different JVM Settings per instance

Filed under: ColdFusion, Programming — joel.cass @ 9:08 am

Recently I had upgraded a ColdFusion server from standalone to multiple instance. This was easy – basically a matter of installing a new copy of ColdFusion as multi instance and copying the settings from the standalone instance. However, the issue has now arisen that every app on the server is to run as it’s own instance and if they all share the same settings, there will not be enough memory to run each instance smoothly.

The problem is, that some instances will require more memory while some will require less. Adobe had posted how to do this on their website but it seems to have been deleted recently. Luckily the instructions were still available google cache! I’ve copied the instructions here for later reference. As I will forget…

Basically, it’s three steps:

  1. Open up the JRun/bin directory
  2. Copy jvm.config to jvm_<server_name>.config
  3. Configure the startup script by
    • Windows: use jrunsvc -remove "<service_name>", then jrunsvc -install <server_name> <server_name> "<service_name>" -config jvm_<server_name>.config
    • Linux/Unix/Mac: add -config jvm_<server_name>.config to the startup command, e.g. jrun -start default -config jvm_<server_name>.config

* <server_name> is the name of the folder under the JRun/servers directory that contains the server, e.g “cfusion”
** <service_name> is the name of the service in windows, e.g. “Macromedia JRun cfusion Service”

November 24, 2010

Bicycle gearing calculator

Filed under: Cycling — joel.cass @ 3:17 pm

I know there’s a few of these around on the Internet but I thought it would be nice to create one of my own. The gearing calculator shows you what sort of speeds you can get out of your current gearing. Also, I’ve added things such as gear inches and gain ratio. The gain ratio even takes into account the crank length that you are using, amongst other things.

Try it out here: Bicycle Gear Calculator

Bicycle Gearing Chart

Bicycle Gearing Chart

November 11, 2010

MS Sydney to Wollongong ride – a big thanks

Filed under: Cycling — joel.cass @ 3:31 pm

Thanks to all who donated their money to the Multiple Schlerosis Foundation in support of my ride from Sydney to Wollongong.

All up, it was about 88km in 2 hours and 55 minutes. The weather held out for a beautiful day, albeit a bit chilly in the morning. The event was very well organised and I was impressed with the level of enthusiasm shown by so many volunteers, it really lifted the spirits to be cheered on by many whom were living or supporting people with the disease.

The starting line opened at around 6am, probably 500 or so people left at the same time, of which I was towards the end of the bunch. It was a bit tricky at first trying to find space to ride with so many people around so I took it pretty easy. After we hit the main roads things started to spread out a bit and I was getting to a comfortable pace. Things continued on that way through to the Royal National Park, which took all the riders down a steep, wet winding descent through some low lying cloud, it was pretty surreal. Coming back up was not quite as difficult as the way down. I was quite surprised, you might be riding uphill for a couple of hundred metres, then down a little, then up again. It was relatively easy to maintain a good pace.

Heading towards coalcliff the pace picked up, I found myself doing around 42 km/h for a while until I reached a group of cyclists who had stopped. I prepared myself for the worst – thinking that perhaps a rider had fallen off or gotten hit by a car I was reasonably relieved to see that it was just a ute that had rolled into a ditch holding the traffic up. Once we got the clear-all from the police it was back on the saddle again and I tagged along with the bunch until Coalcliff.

Another big descent, albeit a dry one this time, led to the Seacliff bridge – this was an awesome spot to slow down a little and soak in the view, then it was a matter of going back up again. This time the hills were a bit longer, aggravated moreso by the fact that the road was still open to traffic, which made it difficult to pass some other cyclists.

After that it was a cruisy trip. All the turns were signposted, the more difficult ones were manned by volunteers. We had to stop to let some traffic pass before another winding descent down to Wollongong. The police did a great job of directing traffic. One even commented on the bandanna I had wore beneath my helmet, “Bogans don’t need helmets do they?” Confused and sort of offended at being called a bogan, I asked him what he meant, but soon figured it was a joke and moved on. Can’t afford to offend the police.

Getting towards to finish line led us down a shared cycleway following the beach and some new housing developments – Wollongong is looking pretty nice these days. Decided to take it easy to the finish line, reaching the end was a mixed feeling of relief and bewilderment – like, is that it?

I had pre-ordered a bike lift back to Sydney, that was probably a mistake. I had arrived in Wollongong at just before 9:00am, however the buses did not start until 11:15. The first bus left around 11:30 and didn’t arrive in Sydney until 12:45, then we had to wait about half an hour for the bikes, which meant I wasn’t on my way back home until around 1:30, giving time for the bikes to get off the truck. This is probably a good option for someone who leaves a little later, but I think in the future I’ll be catching the train. Or, perhaps just ride back, after all it did take around 5 hours for me to get home and only 3 hours to get there.

Anyway, I’ll stop complaining. The ride was overall good and something I’ll definitely do again. Here’s some photos:

The starting line, around 5:50am

The starting line, around 5:50am

Temperature at the starting line: 14.5 degrees celsius

Temperature at the starting line: 14.5 degrees celsius

The view coming out of the Royal NP

The view coming out of the Royal NP

The finish line

The finish line

Wollongong beach (north)

Wollongong beach (north)

View from Stuart park

View from Stuart park

November 5, 2010

Setting up an extranet login page in Sitecore

Filed under: Sitecore — joel.cass @ 8:30 am

Recently, I had issues with the setup of a public logon page in Sitecore. The setup was very similar to the way that login work in the Intranet solution, e.g.

1. A login.aspx page is created in the project folder
2. Settings are added to the web.config <site> tag: loginPage=”/login.aspx” + requireLogin=”true”
3. The login page either displays a form or is secured in IIS and then gets the AUTH_USER header to login users (if implmenting an AD solution)

The problem is, so it seems, that the latest version of sitecore (6.2) works differently from previous versions as documented here and here. The URL parameters item, user, and site are no longer passed. Furthermore, adding a SecurityResolver pipeline didn’t seem to work any longer.

So in 6.2, when a user cannot be authenticated to access a page, they are simply redirected to /login.aspx without any return URL or other useful information. This makes the situation even worse if you are trying to preview a page from the administration interface – basically every initial request is redirected to /login.aspx, and once authenticated the user is returned to the home page, as the original URL was lost when the user was redirected to /login.aspx.

Things seemed futile until a text search of the various config’s revealed the following setting in the web config:

      <!--  SAVE RAW URL ON LOGIN
            Specifies whether the original request URL is passed to the login page
            (saved in 'url' query string parameter).
            Default: false
      -->
      <setting name="Authentication.SaveRawUrl" value="false" />

Changing this setting to “true” now means that the return URL is passed through to /login.aspx as the ‘url’ querystring parameter. You’ll need to modify your login.aspx to look for this parameter and decode the parameter using Server.UrlDecode before redirecting.

This solution is simpler than the previous options available. It’s probably documented somewhere, I just never got a chance to read about it. I hope this is of help to anyone else who may be facing the same issues.

October 26, 2010

Setting the editor stylesheet in Sitecore

Filed under: Sitecore — joel.cass @ 11:02 am

Recently I was working on a site in Sitecore, and was thinking that it would be great if the editor stylesheet could be changed in the system.

Searching the Internet was generally fruitless, and looking through the core data, I couldn’t find any stylesheet config strings. Then, I stumbled upon the SIP Intranet guide, which pointed out that the editor stylesheet is in the web.config:

(section 4.2.1) The stylesheet that is used for the styling of the rich text fields within the editor is determined by the WebStylesheet setting in the web.config file.

And there it is:



Changing this field did actually update the CSS used in the editor, as well as populate the styles listed.

October 19, 2010

Please sponsor me!

Filed under: Cycling — joel.cass @ 10:26 am

I have entered the 2010 MS Sydney to the Gong Bike Ride and have committed to fundraise $1000.00 in support of people living with Multiple Sclerosis. This year MS Australia aims to raise $4,000,000 through the event, and I want to play my part and “ride for a purpose”.

Multiple Sclerosis is a disease of the central nervous system affecting more young adult Australians than any other neurological condition. Your donation will go directly towards providing a wide range of services and support to people living with MS.

Please take a moment to view my online fundraising web page and help me reach my goal. It”s quick and easy. You can donate securely online using your credit card by clicking on the link below:

http://register.gongride.org.au/MS-Sydney-to-the-Gong-Bike-Ride/joelcass/e

All information is secure and all donations will be sent electronically to MS Australia ACT/NSW/VIC. A tax-deductible receipt will automatically be sent to your inbox once the donation is verified.

Did you know?
- The average age of diagnosis of MS is just 30 years
- 3 times more women than men are affected by MS
- An estimated 20,000 people in Australia have MS
- There is no known cause or cure

Your support is greatly appreciated.

« Newer PostsOlder Posts »