StructureCMS

May 26, 2010

.Net based HTTP Client in ColdFusion?!

Filed under: .net, ColdFusion — joel.cass @ 5:12 pm

I’ve been banging my head up against the metaphorical walls around here for ages trying to get ColdFusion to access websites via a proxy server that only supports NTLM authentication.

Short answer: don’t bother. CFHTTP does not support NTLM Authentication. Most of the Java libraries claiming to do so are hopeless. Support is inconsistent because no-one knows anything about the standard. Except Microsoft.

So, it only came naturally that the best way to solve the issue would be to use .net – and now that ColdFusion has a gateway to .net components, I could actually write something that solves the problem!

So, what I have done is written a wrapper that can be accessed by ColdFusion, and a simple custom tag to finish it off.

Some more information regarding download and implementation is in the Projects section.

May 13, 2010

StructureCMS 1.4 Released

Filed under: StructureCMS — joel.cass @ 10:50 am

Recently I have received (finally) a little bit of feedback regarding StructureCMS. Mainly that the administration interface is, well… Ugly. SO I spent a little time sprucing it up and clearing out the cobwebs. Here are some screenshots:

I have also made the following modifications:
- Remove flash-based image uploader (mainly because I was having trouble using it via proxy)
- Added a logo to all templates
- Checked administration system functionality across all major browsers.

Project home | Download File

May 12, 2010

Good, Fast, or Cheap. Choose Two.

Filed under: Musings, Programming — joel.cass @ 4:53 pm

How true is the above statement, really? With the rise of open source products one would think that it’s possible to find a product that ticks all of the above products, and is free to boot.

I found this out recently when I tried using SQL server to load in some website log data so I could generate some reports. Geez, it was slow. It ran at about 45 records per second. Inserting about 64 million records could take a loooooong time. On the other hand, I remembered the faithful MySQL server that I had used a while ago. Loading data into MySQL was fast – about 600 records/sec fast. And it’s free. But is it good?

When actually getting around to running the reports, I was finding that MySQL was falling short. Due to its architecture, sorting operations had to be done by writing a temporary table to disk. This could be worked around by using indexes, however often the indexes would not be picked up, plus the reconfiguration of an index over 64 million records can take 2-3 hours, thus slowing things down.

So either way it was a headache. I know that SQL server is very efficient at sorting and searching records and has its own optimised low-level methods for searching data. If you’ve ever tried to run a database from a compressed drive / folder you would know that certain operations do not work because SQL server accesses data at such a low level. And I think it’s that sort of optimisation that you would happily pay for. Whilst it may be slow on the insert side, it’s fast on the searching side.

So, “Good, Fast, or Cheap. Choose Two.” – I think the saying has real meaning here. An open source product may have the commitment of a small group of developers or no commitment at all. A paid product has a real business motive to keep developers “on the ball”, continually optimising and improving the product.

May 9, 2010

Getting the right fit

Filed under: Cycling — joel.cass @ 2:04 pm

Recently I have been researching how to get the best fit on a bicycle. Every now and then I notice that my knees might get a little sore, or my elbows. And of course there’s the backside pains that occur after every long ride. When looking at any sort of ailment that arises from cycling, the most common recommendation is to get the right fit.

Many bicycle stores offer this as a service, but as a customer I would like to know that they are doing the job properly, because what can occur is that you end up with some lackey who just wants to do a half-arsed job so they can go back to standing around and talking about helmet styles with their co-workers. So it’s good to have at least half an idea about what they’re doing.

So, this is what I have gathered from various sources on the Internet as well as from books and word of mouth.

Pedals

The best sort of pedal is the SPD, or clipless pedals as they are called. Mainly because they allow you to transfer power for the full 360 degrees of rotation. They’re easy to get in and out of, and also mean that you can have a pair of shoes just made for riding. A good shoe makes the ride more comfortable as the pressure is evenly distributed across the stiff sole. Only drawback is that walking in the shoes is at best, uncomfortable and at worst, impossible.

I would recommend shimano’s mountain bike SPD pattern as it is easy to clip in and out of, and allows a generous amount of lateral movement so your feet don’t feel locked in. Plus there are hundreds of shoes available for this pattern.

I have tried cages and was keen on them, however they’re bulky, mark your shoes and the straps don’t last long. Furthermore, getting your foot out of the cage can be difficult after a long ride. But they are OK for occasional riding.

If SPD’s are not your thing, then I would recommend BMX-style pedals – the metals ones with the pins in them – because they do have such a large footprint and the pins stop your feet from moving around, you can transfer power throughout about 270 degrees (from about the 10:30 position through to the 7:30 position).

The important part with any of these options is that the shaft of the pedal is lined up so that it intersects the ball of your feet. This is the most comfortable and efficient position and it should be obvious when riding the bicycle. Many sites talk about toe-in and toe-out, especially on SPD’s. In my opinion, it’s not that important. Tune them so that they point straight forward and the free-play will allow your feet to toe-in or -out. If you see a pattern emerge where your feet are always pointing in or out, adjust the SPD position then.

Type of Saddle

In my opinion, padding on a saddle is nothing more than marketing aimed at misleading the ill-informed public. The first saddle I purchased was a clunky thing with about 2-3cm of “gel” padding on it. Although it was marketed as a “comfort” saddle it was painful. The padding meant that the saddle was pressing against every part of the body – the tailbone through to the sensitive bits, not to mention the extreme chafing caused by the front of the saddle rubbing up against the inside of my legs.

Furthermore, a saddle is meant to have some give, e.g. it acts as a big leaf spring that absorbs some of the shock. Thick padded saddles have none of this – in fact they are often reinforced underneath by a network of plastic bracing that holds the padding on.

The best sort of saddle is one with little to no padding – saddles in the “performance” category, or leather suspended saddle are best, because they do have a springiness to them and do not press up against every part of the body. Any good saddle will also have a void area in the middle – this is not always obvious, some saddles look even at the top but if you look at the underside you will see a bump for the void area.

Saddle Angle

There is only one answer – the saddle should be level. To test for this, place your bike on a flat surface, unloaded. place a board over the saddle and then place a spirit level on the board. The spirit level should be even. Adjust the position until it is, and then mark the position with some liquid paper or similar. After that, take it for a ride and bring an allen key along. Make minor adjustments until it’s comfortable. Use the mark you made with the liquid paper as a reference point.

Saddle Height

The saddle height should be adjusted so that you can just touch the pedals with the heel of your foot. You should be dressed in your regular cycling outfit when you test this out. Then, go for a test ride and see how it feels to ride, stand (2-3 minutes is best), and get on and off your bike. I find that my seat actually has to be a bit lower then recommended just so it isn’t so difficult to stand at lights or get on and off the bike.

Saddle Position

This is by far the best advice I have read about adjusting the fit of the bicycle. The saddle should be forward just enough so that if you hang a piece of string with a weight at the end from the inside notch on your knee, the string will intercept with the shaft of the pedal. This makes sense, as it means that at the most critical angle of the stroke (where the most power is transferred), your leg is not reaching forward or buckling backward, which means that there is less strain on the knee joint.

After I made this adjustment, all my knee pains just went away. as simple as that.

Handlebar Height

Doesn’t really matter and in my opinion is more personal preference than anything else. Personally I like to keep the handlebar low as it means that I will be leaning forward, reducing wind resistance and also distributing more of my body’s weight away from the saddle.

Controls

The best thing to do is to stand on your bike, lean forward on the handlebar and spread your fingers out so that they are pointing straight out from your wrists. Then, there should only be a few (5-10) degrees that your fingers have to move before they are touching the brake levers, and (on mountain bikes) the gear levers should be as close to the brake levers as possible, so that there is no issue of reaching between the two.

Resources