PORTCOMMODORE.COM / LARRYMADE.COM BLOG

A Point on Using PostgreSQL

Starting my web development I chose a very wise combination of Linux, Apache, MySQL and PHP (aka the LAMP stack), and has served me well… One consideration early on was to use PostgreSQL, which is a free SQL implementation. At the time I was having too much frustration with the lack of documentation for it. Now things are different, event ISP support has greatly improved.

One of the things that was really compelling about Postgres is better support for GIS (Geographic Information Systems) data and queries. Here is a link to a slide set, does a good job of introducing spacial data and GIS concepts http://www.slideshare.net/dersteppenwolf/building-a-spatial-database-in-postgresql

Eventually I plan to transition to Postgres. The main issues besides time to do it are are initial configuration (which is the case with everything different) and then secondly is MySQL is a tad more lenient on adhering to the SQL standard then Postgres, so there would need to be some updates to Queries.

~~LINKBACK~~ ~~DISCUSSION~~

2011/04/17 16:50

PHP - Wanted: Improvement in Parsing Lookup Tables

This is something I have unsuccessfully been searching for on and off for the past few years. In my work we get lookup tables…

Here is a general example, given the Family size in columns 3-7 and the monthly income equal to or greater than the amounts in the rows under the family size, you can determine the rate from column 2… Similar to US income tax tables…

Family Size & Income
# RATE 1-2 3 4 5 6
1$1.0010001500162017801900
2$1.5010561560170019002030
3$2.0011201610179020012170

I am looking for is a good way to parse these tables to lookup via text file or DB. The more the input can retain the original format the better. Lookups should be accessed via a PHP function like: $rate = findRate($famsize,$income).

Currently I do it with a MySQL table, and the data does not look anything like the above, and is understandably a pain to make into an entry screen for it - the format is right, but the user can't just copy/paste the text of the table in and have PHP parse in the data - which would be the desired goal. I would really like the data saved more looking like the table above. Anyone have/know any approaches that make the raw data more presentable or the entry much easier?

~~LINKBACK~~ ~~DISCUSSION~~

2011/04/17 16:50

Malled Communities

I just thought of a new term, “Malled Communities”…. my definition: a walled virtual or technology-based community that offers many shiny things but like malls it all comes with a continuing cost and little control to the user beside purchasing.

The iPhone Store for iPhone and iPad apps got me thinking about it, while initially it sounds perfect, all these great applications that work so well and usually a nice price… but then again, you find that in your little mall-world you cant do some stuff on your own, else you upset the shopkeepers, nor do they really want to to go somewhere else. Let me give you a couple examples of life in and out of the mall…

Life in the Mall

Recently on Leo Laporte's show there was a discussion with one co-presenter about his kids buying virtual accessories for some iPod/Pad aquarium simulation game, and how they ran up $900 in charges for virtual merchandise for it… within a couple hours! The main problem here, is it was all too easy for them to do it too… Once the account is set up (a pre-requisite for activating an iPad BTW) all it takes is a click or two to put a charge on your credit or debit card account.

Since it is iPhone or iPad, they cant really get out of Apple's Malled Community, he just has to be more vigilant about what things his kids click on and what expenses they can incur.

Technologic Blue Skies, Rocks Dirt and Sticks

Lets rewind to my youth, I got a Commodore VIC-20 and later a Commodore 64, the computers are very basic, but ready to program - for me there was no game stores nearby (or any money to buy any) which meant most of my time was spent either playing old games, typing magazine programs (actually not a bad activity, really, you have to do a bit of work for the benefit and it was building keyboard and some reading skills) or writing some programs yourself. I did lots of programming and fiddling on those computers, never really stopped either. And has become an enjoyable and rewarding career for me.

A whole generation of sucessful software developers were spawned by similar childhoods where the computer wassn't all a “mall” but was also a “playground” without stores and with our imaginations became something even more special.

I think giving kids a Linux box would be just as beneficial, if not more than what we had. First off, lets dispel one myth, Linux actually does provide a multitude of free entertainment, and there are some great games there, maybe not as obscenely many as PCs or on the same class as a $60 xBox game but, then again it's not a $60 game either.

One thing Linux does have over the shiny boxes - is tools and capabilities, tools to develop all kinds of graphics, audio & music, writing, animation, 3D, and a wide range of programming languages from BASIC to high-end C, also it can be readily (and freely) setup as a server in itself, to make a single user development platform or home a home LAN server; stuff usually only rich college kids could play with in the past. In fact like the 80's type-in programs where you could see how the program worked, many of these excellent games on Linux offer the source code so one could explore and actually see how a game a game is a collection of many different things and even how it is written and learn from those as well. The mind boggles at all the things kids could discover and experiment with using Linux over some shiny sealed-up gadget. And at the end they will likely now a lot more about inner workings of computers than most other Windows/Mac using kids.

~~LINKBACK~~ ~~DISCUSSION~~

2011/04/17 16:50

Welcome to the Blog!

Here it is, my shiny new blog!

The cool part is it is using the Wiki, which means I can transfer stuff I want to keep into the the main pages.

In case you are wondering, This site uses Dokuwiki as the engine behind all the pages.The template that provides the navigation menus is a modified version of Dokubook. There are more templates for extending features as well as a half-dozen or so that make the Blog work right.

Still have to refine the layout some, but it looks like it's gonna work.

~~LINKBACK~~ ~~DISCUSSION~~

2011/04/17 16:50

Gotta Start Somewhere

For all those interested in programming, here is some code:

10 PRINT "HELLO"
20 END

Seems pretty stupid, but we all had to start somewhere. Hitting the books is great for knowledge… but the more keyboard time you get the more skilled and experienced you will be.

Books won't teach you how you code, they will teach you how someone codes; we all have our own unique style. You wont know what that is till you express yourself and write code. The more you typing-in, writing and re-writing, fiddling, experimenting, and debugging, the better you will be at coding. So remember to stop reading all these self-help things and try some of it out.

End of sermon.

~~LINKBACK~~ ~~DISCUSSION~~

2011/04/17 16:50
Last modified:: 2020/11/22 08:33
   
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International