Showing posts with label dev. Show all posts
Showing posts with label dev. Show all posts

Friday, June 15, 2012

Mozilla Developer Network beats w3schools for HTML help

One of the terrible legacies of the modern web is that most search queries on Google relating to html / web technologies often have terrible results, usually involving w3schools, which has patchy, inaccurate and out of date content. Now if Google was nice, they would simply demote the shitty w3schools content, but there is an easy workaround, you can simply add MDN to your search and get results from the wonderful Mozilla Developer Network.

Thursday, February 11, 2010

thoughts about buzz

so google buzz is here and to use common phrase, disruptive.

my thoughts, all in lower case

facebook has replaced most social email, often via facebook messages,
less often by wall post and comments. it's fun, random but rather noisy.

twitter is the high speed, realtime, random world of both your interests
friends, profession, interestes and your idols.

i'd hazzard a guess and say that email these days is mostly used for work,
only made really useful imho for by gmail.

work takes up a big chunk of people lifes, you may spend a lot of time in
the office, at lunch and after work drinks with work mates. often
in the professional world, you get to meet a lot of interesting people,
usually with common interests thru the work you do

the only instant messager i think should be used for work, is google-talk,
because you can save the conversations for later use.

so, then came buzz

i first saw it one my google nexus one, which i love btw, then it appeared
this morning in my gmail. interesting, lot's of "first posts" etc to start
with

i noticed myself enjoying the ability to comment on tweets and status updates,
which i rather liked, also sharing in google reader, which is then buzzed
straight away. it completely left the facebook share bookmark feeling
clunky and so like last decade :)

my audience so far is a more relevant social graph for discussion than
facebook, not because those people aren't also on facebook but i already
or do (occasionally) email them, or more often google talk with them

buzz ain't bad for a first release, google has now completely surpassed
microsoft as the dominant company in it.

between gmail, jira, twitter, facebook and google reader, gmail still has
the nicest interface, perhaps almost the oldest too.

now why can't i save my sms from my nexus one as conversations in gmail huh?

google contacts is perhaps one of the least praised aspects of google's
android extensions. i now have just one email and phone number database,
which i can edit with real tools like a keyboard and mouse, happy!

fingers crossed and lets hope google stays true to their motto

postscript!

my first reaction to buzz was, how good is this for business purposes?

facebook, twitter, sharepoint & notes have just been completely aced
by what buzz brings to google business offering, can they catch up?

Saturday, January 16, 2010

Coldfusion Performance Consulting

Apart from writing applications from scratch, which I have been lucky enough to do a lot in my career, I also have done a fair bit of application taming.

Performance tuning is a technical art form and something I really enjoy, there's nothing more frustrating as a business owner as paying for some development and then being given a solution which is frustratingly slow.

Coldfusion is great to get started fast, but often this leads poor database design and other problems which can cripple performance.

A good web based application should be able to do most things under a second, post initial load of course. If your's doesn't, generally speaking, the application isn't complete, if your the client, i suggest with holding payment.

That said, it depends on your focus. Admin functionality might simply take longer to run, it's the core of the application I'm talking about.

For example opening the home page, searching for client records, viewing and editing the main record type in your organisation, these should be quick items. If they aren't, your wasting money on staff watching hour glasses.

Anyone needing some consulting in this area, please contact me, I enjoy diagnosing and fixing these problems!

Sunday, November 29, 2009

After moving from Modelglue to Coldbox, suddenly it's fun again

After using Model Glue (MG) for a few years, I started about 6 months using Coldbox (CB) and boy has it been a refreshing experience. Both claim to be Model-View-Controller or MVC frameworks, but as I have said in the past, Model Glue is MVCX, that is MVC + XML.

I hate the X in the MVCX, purely because XML isn't a programming language. CFML is, and that is what made programming Coldfusion (with Coldbox) fun again.

You simply can't express complex ideas simply in an XML file, it's a no brainer. The XML files used in Model Glue are highly repeditive and violate the DRY principle.

I am a CF developer since 96 and while i really benefited from using MG, I was continually battling the concept of trying to be 'true' to the framework and working with the XML files, without breaking the basic MVC concept. Anything complex always ended up with what I saw as dirty workarounds.

Alas, in business, you can't just simply switch frameworks on a large project as most often the client isn't going to pay (or understand) why you need to spend a few weeks rewriting something which already works.

So a new project came up and I finally got dirty with CB, which has turned out to be rather fun. CB has such a broad scope of functionality and great documentation, I find myself writing code without having to work around the limitations imposed by MG.

As I have been doing this programming thing for quite a long time now, I have learnt that often when I get that nigglying feeling that I should be doing something different or that an extra bit of work here or there, it pays off.

Of course that can be a complete scope creep trap for some developers, but that's the role of the senior developer / tech lead / solution architect to understand and make such rational calls.

I use the analogy of selling helium balloons at a fun park. If you fill the balloons and seal them properly , you can walk around all day and just focus on selling the balloons. If the balloons leak, your going to be dealing with parents with crying kids coming back all day to complain, plus you'll be making trips back to your van to refill your stock.

When I worked at a SME a few years ago, on a big project for a Telco, I was lucky enough to have my desk in the same area as the support team. That meant I got to over hear problems as they came in and over time, that allowed me to stablised the project with targetted improvements that so drastically reduced the amount of support required that the project as deemed mature and was outsourced to an Indian support team.

What I love about CF is how productive you can be and how amazing the CF community is. Adobe, has rather expensive support, but that has always been less of an issue for most CF developers & shops because of the community, most of us simply have never used Adobe support.

All I'm saying is that if your using Model Glue, let me recommend taking Coldbox for a spin, it will make your programming life much more enjoyable & productive.

Saturday, October 24, 2009

A must see presentation about the business of software

Just a quick post, Paul Ramsey made a brilliant presentation at FOSS4G 2009 Keynote

If you work in the software industry, you should really watch this...

FOSS4G was really an amazing conference

Tuesday, December 30, 2008

Problem Solving

John Resig's recent post about the life cycle of finding a bug and reporting it, is well worth reading...

Whilst titled A Web Developer's Responsibility and containing a little bewildering geek stuff for the non technical, the principles and approach involved are applicable to nearly all team based problem solving...

z

Friday, December 12, 2008

XUL Profiler Addon profiles your Javascript too

Check it out, useful for anyone doing stuff with javascript (not just XUL)!

easily confirm your performance hunches

http://blog.yoono.com/blog/2008/12/download-yoono-xulprofiler/

Interestingly, Facebook is running load most of the time..

Wednesday, November 12, 2008

JxLib AJAX Library released into the wild

Paul Spencer announced on the Fusion mailing lists today that JxLib has been released as a seperate project up on google code.

JxLib is another AJAX UI library based on Moo Tools which is used internally by Fusion.

I know there are a lot of AJAX UI libs out there, but check out the examples!

Saturday, November 08, 2008

GITA GIS Technology Workshops 11th, 13th Nov 2008



I will presenting at the Sydney (PDF) and Melbourne (PDF) legs of GITA's GIS Technology Workshops next week.

There are two workshops, Automated CAD & GIS integration for better asset data management and Open Source Geospatial: How Can Your Organisation Take Advantage?

The speaking lineup includes Andrew Bashfield, Steve De Rosayro, Omar Awny, Jody Garnett, Milton Loftberg & Cameron Shorter.

I am involved in the Open Source Geospatial workshop and will be presenting a Case Study: Open Source Deployment at Ballarat University and Explore Australia.

Explaining how Ennoble leveraged MapGuide Open Source and OpenLayers on these projects to deliver flexible, scaleable, low cost solutions, I'll also be talking about some of our experiences and benefits that come from using open source from a business perspective.

It's more like cooking dinner with a great selection of fresh produce rather than settling for a frozen dinner!

Autodesk organised a similar workshop up on the Gold Coast a few months ago and it was really interesting day. Milton Loftberg's practical demonstration of MapGuide, which included my favorite moment when one of the audience, an ESRI user was completely jaw-dropped at the speed which a new MapGuide map was opened and displayed.

Sorry I haven't blogged this earlier as I know it's late notice, but I hope to see you there.

I always enjoy meeting people who read my blog, so if you are coming along say hello!

Friday, September 05, 2008

Efficiently using Oracle sequences which have increment set greater than 1

Some application's create sequences which auto increment by say 200, Map 3d does this for example with the ENTITYID sequence. It means Map 3d reads the sequence once and then waits until it has used 199 values before grabbing another sequence.

This can be inefficient if you loading data via a INSERT into SELECT approach, each row will up the sequence by 200, not really what your after.

Oracle's PL/SQL functions to the rescue

CREATE SEQUENCE SEQ
START WITH 1
INCREMENT BY 200
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER;

CREATE OR REPLACE FUNCTION getseq( rn integer, incred integer )
RETURN number IS
calc_seq number;
BEGIN
IF mod(rn, incred) = 0 OR rn = 1 THEN
select seq.nextval into calc_seq from dual;
RETURN calc_seq ;
ELSE
select seq.currval into calc_seq from dual;
RETURN calc_seq + mod(rn, incred);
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN -1;
END;
/

-- populate currval for the session so the next query doesn't error

SELECT SEQ.nextval from dual;

-- handy way to get 30 rows from dual, using 10 rather than 200 to keep it simple

SELECT rownum, zac.getseq(rownum,10) seq, mod(rownum,10) mod_result, seq.currval
FROM dual connect by rownum < 31;


ROWNUM SEQ MOD_RESULT CURRVAL
---------- ---------- ---------- -------
1 201 1 200
2 203 2 200
3 204 3 200
4 205 4 200
5 206 5 200
6 207 6 200
7 208 7 200
8 209 8 200
9 210 9 200
10 401 0 400
11 402 1 400
12 403 2 400
13 404 3 400
14 405 4 400
15 406 5 400
16 407 6 400
17 408 7 400
18 409 8 400
19 410 9 400
20 601 0 600
21 602 1 600
22 603 2 600
23 604 3 600
24 605 4 600
25 606 5 600
26 607 6 600
27 608 7 600
28 609 8 600
29 610 9 600
30 801 0 800
30 rows selected

Tuesday, August 26, 2008

Finally a decent browser home page!

Firefox 3 has some pretty funky features with places, it's ability to remember
what you search for, does make surfing much nicer.

I use iGoogle for a quick flick through rss feeds, but I think I have a new home page - AutoDial.




Basically it's like dashboard of all the most often / recent links you have visited.

Applying the old 80/20 rule, I reckon this means a lot less typing whilst surfing!

Great for all of those dev urls as well.

(I borrowed the picture, mine has internal urls all over it)

Monday, August 25, 2008

Handy little diagram tool - Pencil Project



Pencil
is a nice and simple ( i.e. not Visio ) add-on for Firefox which allows for drawing a quick diagram or even a basic application UI's. It supports drag and drop, it's free and it only requires Firefox 3.

Once install it's available as a link off the Tools menu.

It was one of the 3 Best New Add-on's in the Extend Firefox 3 Contest

Friday, August 22, 2008

Mapguide FDO, making oracle describe schema perform

(this was posted on fdo-users)

This is the query being used at the moment for the describe schema in King Oracle,
(I did rewrite the sql a bit, I got rid of there where clause)

SELECT   a.owner, a.table_name, a.column_name, a.srid, a.diminfo, b.cs_name,
b.wktext, c.index_name, d.sdo_layer_gtype, s.sequence_name,
d.sdo_root_mbr, NULL o1, NULL o2, NULL o3, NULL o4, NULL o5, NULL o6,
NULL o7, NULL o8, NULL o9, NULL o10, NULL o111, NULL o12
FROM all_tab_columns t
INNER JOIN all_sdo_geom_metadata a
on t.owner = a.owner
AND t.table_name = a.table_name
AND t.column_name = a.column_name
LEFT JOIN MDSYS.cs_srs b
ON a.srid = b.srid
LEFT JOIN all_sdo_index_info c
ON a.owner = c.table_owner
AND a.table_name = c.table_name
LEFT JOIN all_sdo_index_metadata d
ON c.sdo_index_owner = d.sdo_index_owner
AND c.index_name = d.sdo_index_name
LEFT JOIN all_sequences s
ON s.sequence_name = CONCAT (a.table_name, '_FDOSEQ')
--and s.sequence_owner=t.owner criteria
ORDER BY a.owner, a.table_name
it's pretty slow because of the use of the all tables, I think there's
a bug in there as well with the sequence join, it will match on duplicate
table names in other schemas.

but the performance goes to hell if you add the s.sequence_owner=t.owner criteria back in

if we just use the user views, that problem disappears
SELECT a.table_name, a.column_name, a.srid, a.diminfo, b.cs_name,
b.wktext, c.index_name, d.sdo_layer_gtype, s.sequence_name,
d.sdo_root_mbr, NULL o1, NULL o2, NULL o3, NULL o4, NULL o5, NULL o6,
NULL o7, NULL o8, NULL o9, NULL o10, NULL o111, NULL o12
FROM user_tab_columns t
INNER JOIN user_sdo_geom_metadata a
on t.table_name = a.table_name
AND t.column_name = a.column_name
LEFT JOIN MDSYS.cs_srs b
ON a.srid = b.srid
LEFT JOIN user_sdo_index_info c
on a.table_name = c.table_name
LEFT JOIN user_sdo_index_metadata d
on c.index_name = d.sdo_index_name
LEFT JOIN user_sequences s
ON s.sequence_name = CONCAT (a.table_name, '_FDOSEQ')
ORDER BY a.table_name
the performance improvement and load reduction is quite dramatic, the
difference is that user_tab_columns lists the objects owner by the users,
while the all_tab_columns lists everything that the user has access to

when using these tables, a ALTER SESSION SET CURRENT_SCHEMA='%kingoracle.oracleschema%'
would be required at the start of the session if you use a different
username than the specified oracleschema

small schema
q_user_schema (Datasource=gis, Time=16ms, Records=4) that's roughly 100 times faster
q_all_schema (Datasource=gis, Time=1750ms, Records=4)

big schema
q_user_schema (Datasource=gis, Time=234ms, Records=146) that's roughly 6.5 times faster
q_all_schema (Datasource=gis, Time=1531ms, Records=146)

not only is it faster, but it's also a lot less work for the database

Wednesday, August 13, 2008

Tiny little Openlayers & Mapguide & Fusion patch fest

I think we may of finally got most of the all the bugs out of the mapguide implementation with Openlayers.



This little screen shot, without any pink tiles, is the result of all the bits below working together..

If you doing much with Openlayers and Mapguide, I think you will find both these patches useful

  1. Mapguide dynamic overlays fails
  2. A Mapguide Tiled map with all the co-ordinates correct :)
    var metersPerUnit = 111319.4908; //value returned via MG API
    var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
    OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
    OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
    OpenLayers.DOTS_PER_INCH = 96;
    turns out that's all required in order for a mapguide tiled layer to display with correct co-ordinates, aside from extents and scales

  3. A Sheboygan example of Mapguide tiled map, Untiled map and untiled map as Overlay all in one map, which makes a good starting point

  4. Fusion fix for the Mapguide error:The value cannot be less than or equal to zero.

  5. Finally a sainty bug against mapguide, "The value cannot be less than or equal to zero." is meaningless with out context


Life should be a little bit easier for anyone using Mapguide and Openlayers now!

Friday, July 25, 2008

CFQUERY STRICT="TRUE"

There's been a lot of SQL Injection attacks against Coldfusion following the attacking coldfusion article a few weeks ago. There are lots of very old CF apps out there and some newer ones which are a little slack when it comes to using CFQUERYPARAM.

I have a simple solution which could be easily added to Coldfusion. All we need is a STRICT option to disable cfml variables within CFQUERY, still allowing flow control tags, but any attempt at output in the cfquery will throw an error.

This could be configurable as STRICT, OPTIONAL or NONE at the server/application level and there could be an override option on the CFQUERY tag which would still throw in the STRICT mode.

With this enabled, testing any application for this problem would become a walk in the park.

Thursday, July 24, 2008

Using Coldfusion with Mapguide Open Source

A long time ago, back in the old days, when Mapguide was only available as closed source, windows only commercial product, Coldfusion (4.x C++ days) was bundled for free along with Mapguide.

As a result there are a lot of spatial shops who (have) used Coldfusion. Mapguide Open Source doesn't list CFML as one of development languages supported, it does however, support Java.

To get access to the Mapguide API in Coldfusion it's quite easy, simply copy the following directories over into your Coldfusion lib directory (just make sure you choose to also install the java api when you install the webserver extentsions).

copy 'C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\WEB-INF\lib\*.*' C:\ColdFusion8\lib

copy 'C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\Tomcat\bin\*.*' C:\ColdFusion8\lib

Restart Coldfusion and then you can start to use the Mapguide WebApi

To get started, this is how you initialise the connection the Mapguide server in CFML


// Initialise the webtier connection
webconfigloc='C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\webconfig.ini';
MapGuideJavaApi=createObject("java","org.osgeo.mapguide.MapGuideJavaApi");
MapGuideJavaApi.MgInitializeWebTier(webconfigloc);

//Setup a session
mgUserInformation=createObject("java","org.osgeo.mapguide.MgUserInformation");
mgSiteConnection=createObject("java","org.osgeo.mapguide.MgSiteConnection");
mgUserInformation.setMgUsernamePassword(username, password);

//Create a session
mgSiteConnection.open(mgUserInformation);
session_Id=mgSiteConnection.GetSite().CreateSession();

//Get the resource service
resourceService=mgSiteConnection.CreateService(0);


The examples are pretty much all in PHP, but that's pretty easy to translate to CFML. With the above example, you can then simply dump the resourceService to see what's available.

Wednesday, July 23, 2008

New facebook design has teething issues

I can't log into the facebook at the moment, I keep getting redirected between the old and the new site, eventually, I get the nice graceful error message in Firefox "Redirect Loop."



Spying with livehttpheaders, I can see the site redirecting me back and forth between between the old and the new home...

Some older browsers needed to be killed when they hit something like that..yuk!


http://www.facebook.com/home.php

GET /home.php HTTP/1.1

HTTP/1.x 302 Found
Date: Wed, 23 Jul 2008 04:19:03 GMT
Server: Apache/1.3.41.fb1
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://www.new.facebook.com/home.php

http://www.new.facebook.com/home.php

GET /home.php HTTP/1.1

HTTP/1.x 302 Found
Date: Wed, 23 Jul 2008 04:18:57 GMT
Server: Apache/1.3.41.fb1
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://www.facebook.com/home.php
X-Cnection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8



and back to were we came from and over and over and over again

ah well, time to get back to work done.... I haven't found a fix yet either

Of course there's no refer being passed and thus no sanity check to see if it's redirecting in a loop....

There's a nice analysis of how bloated Facebook currently delivery method is over at nerdlife, basically it's the sheer volume of javascript, css and images required for a single page.

That's why facebook really suffers from bandwidth congestion, like when your housemate is downloading heaps on Bittorrent without limiting the bandwidth use

Sunday, July 13, 2008

Yey another lame attack on Coldfusion

I have been following the 0x000000 # The Hacker Webzine blog for a while and was really dumbstruck when i read the following article Attacking ColdFusion.

It was one of the lamest "security" notes I have read in a while, utterly rubbish, valid, but there's nothing really Coldfusion specific in there and all the potential holes described some require some dumb configuration changes or setup.

Sure there are might be some old vulnerable apps out there, as there are for php or asp, but best practise is oft discussed & preached in CF land and the same criticism's could be applied to most programming languages ....

I wait with baited breath to hear of exploits that were reported to Adobe, fixed and then rolled out as a update being publicised....

meanwhile, CF continues to be a pleasure to work with :)

Friday, July 04, 2008

Australian Public Ticketing Madness

There is some sheer and utter madness going on down under...

Public transport is pretty common around the world, but for some reason the State governments here like the pain and expense of attempting to develop their own ticketing systems, over and over again....must be all the free lunches

Currently Victoria and New South Wales are developing their own systems, Myki and TCARD respectively.

What an utter waste of time and money.... two expensive systems which are going to be most likely 'incompatible', 'late' and out of date on implementation...

Time to consider nationalising public transport, lets face it, the states are failing miserably, they don't have the cash balls to build new public transport and it's the only way we are going to really get things moving...

Lets consider making public transport free nationwide.. Save a few billion bucks on these dumb new ticketing systems, plus the saving on inspectors and the whole ticketing infrastructure.

It does mean we are going to open the flood gates when it comes to public pressure for new train lines and the like, but lets face it, we need it.

Public transport is becoming free in Melbourne by stealth, it's quite common to get to a train station or tram and find the machine don't work...

Thursday, May 29, 2008

Accessing Mapguide via Studio from behind a proxy

Mapguide Studio doesn't seem to have any proxy support, which is pretty annoying when your working behind a corporate firewall.

An easy solution is to use Apache as a reverse proxy

Make sure that mod_proxy_http and mod_proxy are loaded, usually this involves un-commenting the LoadModule in the httpd.conf file


ProxyRequests off
ProxyPass /mapguide_extsite/ http://external.dot.something/mapguide/
ProxyPassReverse /mapguide_extsite/ http://external.dot.something/mapguide/
ProxyRemote http://external.dot.something/ http://corporate-firewall:8080/

If the proxy server requires a username & password you can use the old username and password in a url trick

ProxyRemote http://external.dot.something/ http://user:pass@corporate-firewall:8080/

UPDATE: unfortunately the username password bit doesn't work, there is however a bug with a patch for a proxyremote extension from early 2006