Showing posts with label Job. Show all posts
Showing posts with label Job. Show all posts

Thursday, January 20, 2022

SQL is your friend

Today I had a minor task to implement.  The task was to initialise some new data in a file.

Typically, I would write a program as an EXCEXTFUN and do my processing via standard 2E code.  The problem with little data update programs is that unless you manage them well (i.e. remove them, label them so you can ignore them etc), they start to clutter the model.  On the other hand they are handy to have around in case someone needs to do something similar in the future.

However, unless you are a software house, you probably don't care too much that this 'product field' was initialised 8 years ago by xyz user.

That all said and done, my task was to insert a data record and there were some fields that needed to be initialised that contained the business data, and, there was also an AUDIT STAMP for the INSERT.  If you don't mind me saying, it was quite a convoluted one at that too with numerous fields.  This AUDIT STAMP required a User, Date, Time, Job Number and Job Name among other fields.  With 2E all of these are simple to MAP and are available to us via the JOB context.

My task was to implement the data without adding to the setup/fix program maintenance burden and on this occasion we have a few choices.

  1. Write a document explaining to the implementer how I want them to add a record. Either by a YWRKF hack or perhaps a user screen.
  2. Give them a small data file and ask them to CPYF the records into the target file as *ADD.
  3. Write that 2E program I spoke of above and get them to call it.

Or, as I did in this instance.  

    4. Simply give them a line of SQL I wanted them to execute.

Sweet, job done, but how do I initialise the 2E formatted date, or get the current system date and time from the machine and, where do I get the JOB details from that are so easily available within 2E code via the JOB context.

The answer is as follows: SQL has what it calls global variables (Blue) and functions (Red).  It just turns out that some of these are useful for me to update my fields in the AUDIT STAMP.

In order to initialise my fields I just substitute my insert data with the following:-

User Profile = USER
Date = DEC(CURDATE())-19000000
Time = DEC(CURTIME())
Job Number = LEFT(JOB_NAME,6)
Job Name = SUBSTRING(JOB_NAME, LOCATE('/',JOB_NAME,8)+1,10)

You will note that to get the 2E DTE format we simply minus the 19000000.  For the standard TIME and USER fields we just use the variables without any manipulation.

For Job Number we need to extract the data the JOB_NAME variable.  Usually this is formatted as 123456/LDARE/QPADEV0001 for example.  However, for people with longer names it could be 654321/PLONGNAME/EOD, also the job running the task may not be an interactive screen if it was submitted for example.

This means that to get the job name data from the JOB_NAME SQL global variable we need to call a little function that locates and substrings all the data after the 2nd '/'.  Given that the JOB_NUMBER is always 6 long I've just arbitrarily started from the 8th character.  I could have embedded more LOCATE calls to replace this hardcoded value, but as always, time was against me.

Hopefully, in the future if you need to update a table via SQL, but were put off by now knowing how to get at some of these global variables, the above will stick in your mind.

Thanks for reading. 

Lee.

Saturday, September 6, 2014

Opportunities

Hi All, 


My current employer is always on the lookout for quality 2E people.  All enquiries welcome.  Just link in with me (See button on this blog) or PM me.  Please mention this on the invite.


Preference will be given to those either in Australia or eligible to work in Australia.  (No remote working as yet).


We are also interested in young junior/mid range level programmers to compliment the team.


Thanks for reading.
Lee.

Thursday, September 20, 2012

Game creation tools. New domain, same conversation.

Some gaming on the side.....

Yeap.  For the 2E and Plexers out there I am afraid I am between opportunities at the moment so am not using the tools on a daily basis.  In the meantime I have turned my hand to a second love of mine.

Making computer games.  

Some of you may know that I have written games in the past.  I remember demonstrating/hassling my colleagues way back when I was working in London as I was creating a game.  6 months of sweat (some tears) later...... I published a shoot em up (Galaxian style) in 1999 for my cousin who was 13 and totally chuffed when he realised that he could blow up his parents on Level 5 (Phase III).

I am pleased to say that some years later he turned out to be of sound character so killing his virtual parents never crossed contaminated his real word views. :-)

At the time I used a tool called "The Games Factory".  This was a IDE and engine rolled into one and it allowed you to create a game (at that time it targeted windows).  This tool has had a second version and updates ever since and has also been superseded by a tool called "Multimedia Fusion 2".

Nowadays, this tool can create games for Web, Android, iOS (iPad and iPhone) as well as XNA for windows devices.

I decide to blog a little about this as the concept of these types of tools is not too far removed from the ideals behind the 2E and Plex tools (technology insulation, templates, productivity) to name a few of the key features over raw coding.  I am currently using two additional tools from www.gamesalad.com and www.stencyl.com.  Both tools are aimed for lowering the threshold to get into games creation for your favourite devices.

The irony for me is the forums I take part in have the same debates that defenders of 2E and Plex have endured over the years.  i.e. 3GL coding versus 4GL code generation.  Numerous times I have had to draw the comparisons for this generation Y or whatever we are calling youth now.

In one camp is the (take Apple) XCode only guys who have hand crafted every element of the game engine and experience, whereas, on the other side are Stencylites or Saladers who believe in gameplay and quality graphics etc etc.

As always it depends on the project, timescale, developer capability and you guessed it, no one solution to fit all scenarios or game types, they all have there limits, learning curves and price point.

The grand daddy of 3d games in this space (hobby, Independent to Studio) is Unity but that also comes with a price tag to match.  Still all of these are cheaper than licensing a 3rd party engine like Unreal.

On the gaming side of my life at the moment I hit issues with game performance that require tuning, features that are not yet in the tools but on the roadmap and eagerly awaiting updates, 3GL vs 4GL debates within forums etc etc.    In a way a parallel universe to my professional life using 2E and Plex.

If any of you 2E and Plex guru's out there fancy doing something a little different you'd not do much better than the tools I have mentioned.  Unless you are a coder coder and therefore you can utilise some of the SDK's and chose your relevant physics engine for example :-)

Now I just need an excuse to integrate a Plex or 2E server application within a game and be the first person to integrate these technologies......

When the game I am building hits the stores I'll be sure to let you know.

Thanks for reading.
Lee.

Edit 1 - Fixed up a few typo's
Edit 2 - There is also another SDK of interest called CoronaSDK which bridges the gap between the 3GL approach and the 4GL approach.  It's effectively uses and intermediate language that then compiles and uses runtimes for the relevant devices, all packaged neatly and available to download from an app store near you.  Check it out www.coronalabs.com

Sunday, June 22, 2008

The "Wooo! moment" Factor

This is another one of my general life blogs and follows up from my recent article about what makes a good programmer where I refer to a ‘Rocky Balboa’ moment that encompasses everything about being a great computer programmer.

I would like to clarify that this post has nothing to do with the incessant number of reality talent shows and is not in anyway linked or endorsed by those in the entertainment industry.

However, I recently went to the Smackdown/ECW world tour event here in Auckland, New Zealand.

Like most of the other hardcore WWE fans I registered for the internet presale, logging in a minute or two before midday and continually pressing the refresh (F5) button in Internet Explorer until the ticket selection page popped up. A quick combo-box click later and an anxious wait ensued whilst the system allocated my tickets and then the “Woo! moment” came.

I knew it was a full on “Wooo! moment” as it did turn the heads of a few people in my office.

The reason being was that I was lucky enough to get front row tickets, seat numbers 1 and 2 which was not only the closest you can get to the ring but also the closest you can get to the entrance ramps for when the wrestlers strut their stuff as part of the pre bout entertainment. The arena held thousands and thousands of people and to get to two best tickets in the house was reason enough for me to celebrate. Actually, celebrate for my daughter, as she is the wrestling fan. I just have transient knowledge.

For anybody that follows the WWE Wrestling you will probably know a guy called Ric Flair. He is a 16 times world champion as well as being regarded as one of the all time greats. He is also famous in WWE circles for his tag line “Wooo!”. So much so that the last three shows we have been to, Ric Flair has never been there, he has been retired since March 2008 and yet everyone was shouting “Wooo!” as the excitement began to build in the arena.

Now for me life is about experiences and the memories thereafter. We have both good and bad times that shape us all individually in some form or another. And one hopes that over the balance our lifetime that there are many more good times rather than bad and it is these good times that I affectionately refer to as the “Wooo! moments”.

Now if we spend on average a minimum of between 50 and 70 hours travelling and working each week I often ask myself why do people put up with a job or a career that doesn’t provide them with “Wooo moments”. I have been pretty lucky in this regard over the years. I am an analytical person and love computers. As a child at my local school jobs fair in 1983 I expressed that I wanted to be a computer programmer. After a few minutes searching the database (list of jobs on paper in those days). I was asked if I wanted to do commerce, a funny choice at first until you realise that it was the closest alphabetically to computing.

How times have changed.

Now everyone wants to do computing and whilst there are now more areas to become expert, I also believe that computing remains at risk of be dumbed down. I say this because many people are getting into computing because they see a higher than average salary trend, they only see the exciting parts of the job glamorised by Hollywood films or they see it as easy.

For me I got into computing because of the “Wooo! moments” and I continue to adore this line of work. But also as I get older I also find myself enjoying the fact that others around me are having their own “Wooo! moments”. I'm a little like grandparents who enjoy watching those cute little bundles known as grandchildren.

But of course it doesn’t stop there.

You may have a job that only has one or two “Woo!” moments in an entire career span. A recent example was the recent mission to detect life on Mars. Some of those guys had been working on that mission for 10 years or more. But that “Wooo! moment” when that million dollar craft landed on Mars and started to do its stuff.

Wow!!!!

The screams of joy and relief I could hear just by watching the footage on a 21” TV was there for the world to see.

The “Wooo! moments” are what drive me to get up each day and if you find yourself having less and less of these moments whilst at work.

Ask yourself why?

Work does dominate and validate many of ours lives so you might as well enjoy what you are doing. But please don't moan to me about your job. Do something about it.

Please, ensure that you do. Life is too short.
Thanks for reading.
Lee.

Monday, March 17, 2008

What do you do for a living?

This has to be one of the most common questions asked of anyone in life. Apart from, How are you?, Can I buy you a drink? or cringingly, Do you come here often?. Well, this isn't an article about chat up lines or dating gotchas. I am long past all of that.

However, many people can simply reply “I am a plumber” or “Nah, I’m a sparky geezer!” (Electrician), or perhaps they might say "I have my own business selling cars" or "I work for a bank doing banking stuff". The point here is that no matter what they do, their audience will immediately be able to understand what they do and if they need their help or services, they can simply ask.

For the average IT geek, this is always a tricky and preferably avoidable question. We tend to shy away from disclosing our job because we are concerned about the impact of this little snippet of knowledge in the heads of a non IT savvy person.

There is a common phrase in IT that goes something like, 'A little bit of knowledge is a dangerous thing'. Actually, I guess this is true, in general. DIY being a good example.

As IT professionals we tend to try and answer this question ambiguously.

Mainly because we think that what we do is so very specialist and complicated, we also make allowances for the questioner as we believe that they will switch off. We have a primeval fear that we will not be able to complete communicating the fluffy, pinky greeny codey stuff, about why we love our job.

On this note, I do appreciate that in all professions there are general conversations and then there are the technical jargon and insider acronym riddled low level conversations.

As IT professionals we have invented more TLA's (Three Letter Acronyms) than any other profession, possibly with the exception of airport abbreviation naming committees.

Anyhow, a typical answer would be “Urrrrm, Computers”.

“Arghh, Right!!!” comes the reply, quickly followed by “Can you take a look at my computer?”.

And this is it, the single biggest fear of an IT professional. Your job might be that of a patterns and framework designer for J2EE or you may be a Mainframe performance specialist, but rest assured the simple mention that you work with “Computers” means that you are now their personal technical support helpdesk, for life........

Now, by contrast, our plumber and electrician are both in the home building or renovation trades, but, you never hear me asking them if they can do some plasterboard stopping, tile my roof or fit double glazing.

I guess that over time the general levels of understanding of the different roles within IT will improve. However, until this day has arrived I have learnt the hard way to always reply in a precise and exact manner.

"I specialise in software application modernisation, building and shaping high productivity development teams to meet the demands of developing enterprise business applications. I also provide bespoke consulting and training services and expertise in utilising multi-platform 4GL code generation tools.”

Now, for all but the most technical people out there, I tend to get that ‘lights out’ glare about halfway through that sentence, but, on the plus side, I also no longer get those requests for on the spot computer repairs.

Thanks for reading.
Lee.