What it is like to be a programmer.... (1 Viewer)

GJH

LIFE MEMBER
Aug 20, 2007
29,450
38,827
Acklam, Teesside, originally Glossop
Funster No
127
MH
None, now sold
Exp
2006 to 2022
UNDERSTATEMENT OF THE YEAR FROM GROMMIT !!!!

DONT WORRY, IT DOESNT GET ALL TECHNICAL !!!!!!
The thing is that it doesn't start off technical. Like anything else, if you can't describe what you want to build in plain language then you aren't going to be able to build it.
The technical bits come along in the design stage - finding solutions to how to build it.
Programming itself (the coding bit) is only really knowing how to express the design in the appropriate computer language.
 

Chris

LIFE MEMBER
May 5, 2010
21,042
277,714
Funster No
11,412
MH
None
Exp
10 years
RPG stands for rocket propelled grenade.

Well it does in Medal of Honour on my PS3.
 
Nov 18, 2011
11,862
42,765
Planet Earth
Funster No
18,938
MH
A van
Exp
Over 25 year's
I did DBA part time, it is the worst part of the job. Trying to fight with developers who don't know how to optimise SQL statements or explaining why they shouldn't do joins on non indexed columns. They always expect me to perform miracles with the hardware they were too cheap to invest in to start with.....

Fortunately @Jim listens to me so we have a nice fast db backing up this site and it never hiccups (touch wood).

In order of preference, I would rather be a programmer than a DBA, I would rather be a DBA than a sysadmin. However my long experience of being a sysadmin means that is where I can get work the easiest. Getting back into the development work is something I have wanted to do for years and I am loving it even with the minor frustrations :)
WHAAT head just smelted layman's terms omg we got DBA and SQL wtf PTSD totally confused :confused::Eeek::beerchug:

Subscribers  do not see these advertisements

 

Riverbankannie

LIFE MEMBER
Mar 11, 2016
10,493
61,377
Bristol
Funster No
41,967
MH
IH 630 RL PVC
Exp
12
DBA database administrator
SQL Is Structured Query Language a coding technique used to extract useful information from the raw data stored in a Database.
Probably best not to go into Joins (Inner and outer ) and indexing!
 

GJH

LIFE MEMBER
Aug 20, 2007
29,450
38,827
Acklam, Teesside, originally Glossop
Funster No
127
MH
None, now sold
Exp
2006 to 2022
WHAAT head just smelted layman's terms omg we got DBA and SQL wtf PTSD totally confused :confused::Eeek::beerchug:
Jargon - special words or expressions used by a profession or group that are difficult for others to understand.

The real fun comes when one does understand the jargon and asks the speaker to explain the meaning in plain English, especially if the speaker is a salesman :D
 

Chris

LIFE MEMBER
May 5, 2010
21,042
277,714
Funster No
11,412
MH
None
Exp
10 years
DBA - Daft Bastard Alert.

Commonly used in my office and by my wife:whistle:

Subscribers  do not see these advertisements

 

Chris

LIFE MEMBER
May 5, 2010
21,042
277,714
Funster No
11,412
MH
None
Exp
10 years
Which DB was D enough to employ a DB then? :D

They have all retired now.

I bumped into my old senior partner last Friday and thought he looked old, and I bet he thought the same...

Subscribers  do not see these advertisements

 
Oct 1, 2013
7,499
19,902
Lanzarote
Funster No
28,377
MH
Nil by mouth
Exp
Lots
DBA database administrator
SQL Is Structured Query Language a coding technique used to extract useful information from the raw data stored in a Database.
Probably best not to go into Joins (Inner and outer ) and indexing!
inner and outer joins are new fangled rubbish and I hated them and never used them.

Dreamt up by Microsoft.
 

mustaphapint

Free Member
Oct 9, 2015
580
778
Worcestershire and Brittany
Funster No
39,344
MH
A Class
Exp
Just starting
Now here's a hard one.

How many people can remember far back enough to when software was tested before being released? :rofl::rofl:
You mean actually write a test plan, get it approved, then do the testing, record the results and show the evidence to prove it works before it being signed off to go live. We're supposed to do that, but I've always been good at fiction.
 
OP
OP
Gromett
Feb 27, 2011
14,704
75,682
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
inner and outer joins are new fangled rubbish and I hated them and never used them.

Dreamt up by Microsoft.

Erm. I find they are essential for all but the most basic of database use cases. If a complex database after normalisation doesn't require a few joins then it isn't being done right :p Joins combined with foreign keys and constraints help to stop programmers screwing everything up when they think they understand what they are doing.

I haven't touched any microsoft stuff in almost 20 years. Don't think they invented SQL or joins did they?

Now here's a hard one.

How many people can remember far back enough to when software was tested before being released? :rofl::rofl:

Erm, I still do. I write the tests before I write the code using Unit tests. I have been using phpUnit for a few years now. Slows you down at the start but speeds you up at the end. ( https://phpunit.de/ ) If you spec the class well at the start, write the unit tests then the coding generally describes itself.

Suprisingly users still manage to find ways to do things that you didn't think were possible, and then to make matters worse can never remember how they did it :mad:

Subscribers  do not see these advertisements

 

GJH

LIFE MEMBER
Aug 20, 2007
29,450
38,827
Acklam, Teesside, originally Glossop
Funster No
127
MH
None, now sold
Exp
2006 to 2022
Erm, I still do. I write the tests before I write the code using Unit tests. I have been using phpUnit for a few years now. Slows you down at the start but speeds you up at the end. ( https://phpunit.de/ ) If you spec the class well at the start, write the unit tests then the coding generally describes itself.

Suprisingly users still manage to find ways to do things that you didn't think were possible, and then to make matters worse can never remember how they did it :mad:
Not just unit tests, which only prove a program does what the program spec said it should do, but full system tests against the system requirements to prove that the system as a whole does what it should do.
actually write a test plan, get it approved, then do the testing, record the results and show the evidence to prove it works before it being signed off to go live.
Like that in the days when it was fact :)

It shouldn't matter what users do if one covers all the possible values which can occur :)
 
Oct 1, 2013
7,499
19,902
Lanzarote
Funster No
28,377
MH
Nil by mouth
Exp
Lots
Erm. I find they are essential for all but the most basic of database use cases. If a complex database after normalisation doesn't require a few joins then it isn't being done right :p Joins combined with foreign keys and constraints help to stop programmers screwing everything up when they think they understand what they are doing.

I haven't touched any microsoft stuff in almost 20 years. Don't think they invented SQL or joins did they?
What I meant was the way they are written. SQL was always used, but you just joined the tables by statements

Someone decided to use the terms JOIN and INNER and OUTER and the whole SQL statement was written differently and harder to debug somebody else's code

EG...
select table1.name, table1.description,
table2.name, table2.description
from table1,table2
where table2.id=table1.id
and table2.`type`=22;

Much easier to read than..
select table1.name, table1.description,
table2.name, table2.description
from table1 innerjoin Table2 on table2.id=table1.id and table2.`type`=22


And obviously I would use aliases for the tables if I wrote it ;)

The two queries are the same, except the second is ANSI-92 SQL syntax and the first is the older SQL syntax which didn't incorporate the join clause.
 
Last edited:

mustaphapint

Free Member
Oct 9, 2015
580
778
Worcestershire and Brittany
Funster No
39,344
MH
A Class
Exp
Just starting
What I meant was the way they are written. SQL was always used, but you just joined the tables by statements

Someone decided to use the terms JOIN and INNER and OUTER and the whole SQL statement was written differently and harder to debug somebody else's code

EG...
select table1.name, table1.description,
table2.name, table2.description
from table1,table2
where table2.id=table1.id
and table2.`type`=22;

Much easier to read than..
select table1.name, table1.description,
table2.name, table2.description
from table1 innerjoin Table2 on table2.id=table1.id and table2.`type`=22


And obviously I would use aliases for the tables if I wrote it ;)

The two queries are the same, except the second is ANSI-92 SQL syntax and the first is the older SQL syntax which didn't incorporate the join clause.
I'll stick to chain and reade thank you. Although you can use SQL statements in modern RPG there isn't much of an advantage if there is a suitable logical view. ;)

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,704
75,682
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Not just unit tests, which only prove a program does what the program spec said it should do, but full system tests against the system requirements to prove that the system as a whole does what it should do.

Because I use an MVC architecture and I ensure that my components are weakly coupled if they are couple at all, unit testing is the best method for ensuring the overall system will meet the requirements and as further development progresses it tests for regressions. The final integration tests only need to ensure the display output (the view) is correct. My unit tests run all the time whenever the application runs. So each time I try a new feature the unit tests all run on all classes and warn me of any regressions. This ensure the overall system is working as it should. I tend to see unit test problems before any application level issues are noticed. Just today it caught a situation where I should be using === instead of == :D

Modern OO development using the MVC architecture backed by unit testing makes continuous testing/integration straight forward if configured up front. I am not a fan of agile, XP or scrum development methodologies as it is a bit too wild west for me, however I don't think the waterfall method is best suited to modern web development. I prefer something that is somewhere in the middle that does allow for changing specs and iteration but starts with a decent spec and a good understanding of the business you are developing for. That said I do like some of the tools that have been developed due to the agile and other more fluid management methodologies. I have utilised some of these with the aim of catching any bugs prior to the release of the software to the client.
 

RogerThat

LIFE MEMBER
May 20, 2016
1,128
991
North West
Funster No
43,198
MH
PVC
code_quality.png


Right? ;)
 
OP
OP
Gromett
Feb 27, 2011
14,704
75,682
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
What I meant was the way they are written. SQL was always used, but you just joined the tables by statements

Someone decided to use the terms JOIN and INNER and OUTER and the whole SQL statement was written differently and harder to debug somebody else's code

EG...
select table1.name, table1.description,
table2.name, table2.description
from table1,table2
where table2.id=table1.id
and table2.`type`=22;

Much easier to read than..
select table1.name, table1.description,
table2.name, table2.description
from table1 innerjoin Table2 on table2.id=table1.id and table2.`type`=22


And obviously I would use aliases for the tables if I wrote it ;)

The two queries are the same, except the second is ANSI-92 SQL syntax and the first is the older SQL syntax which didn't incorporate the join clause.

I understand :) I have used both methods. Unfortunately with prepared statements and using an active record method the old way of doing it is much harder to read now days :(

Also left and right joins I think are not possible using the old style? I am not an SQL expert by any means of the word but I do find using an Active Record system helps avoid SQL injection by automatically handling prepared statements for me and escaping the inputs. When you combine Active records with Joins I find it just as readable when fighting with a 15 line SQL statement :whistle::eek:

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,704
75,682
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
PS: the joins also keeps the WHERE part of the statement nice and clean and keeps the business logic in the join.
Select = what you want
Join = the business logic
where = the result you want and no more.

I suppose since I have gotten into the MVC methodology I like to keep stuff separated like this although I think this is more a style issue than a content issue?
 
Oct 1, 2013
7,499
19,902
Lanzarote
Funster No
28,377
MH
Nil by mouth
Exp
Lots
I understand :) I have used both methods. Unfortunately with prepared statements and using an active record method the old way of doing it is much harder to read now days :(

Also left and right joins I think are not possible using the old style? I am not an SQL expert by any means of the word but I do find using an Active Record system helps avoid SQL injection by automatically handling prepared statements for me and escaping the inputs. When you combine Active records with Joins I find it just as readable when fighting with a 15 line SQL statement :whistle::eek:
When I had use MySQL, I typed in, in the old-school method and it translated it for me to the new fangled way.

All queries can be used in both. Differing syntax, but the Db uses same optimisation methods
 
OP
OP
Gromett
Feb 27, 2011
14,704
75,682
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
When I had use MySQL, I typed in, in the old-school method and it translated it for me to the new fangled way.
All queries can be used in both. Differing syntax, but the Db uses same optimisation methods
I know you can do inner joins using either method. I recently had to do a left join (Don't ask) and I can't think how I would do that using the old method now...

Here is a quick example of what my SQL looks like now. (silly example)

$this->db->select('*');
$this->db->from('blogs');
$this->db->join('comments', 'comments.id = blogs.id');
$this->db->where('blogs.id', $blog_id);
$query = $this->db->get();

// Produces:
// SELECT * FROM blogs JOIN comments ON comments.id = blogs.id where blogs.id = '$blog_id';


But I find this much easier these days to manage. I have just converted a 15 lines SQL string to Active Record format what a ballache that was.

Subscribers  do not see these advertisements

 

GJH

LIFE MEMBER
Aug 20, 2007
29,450
38,827
Acklam, Teesside, originally Glossop
Funster No
127
MH
None, now sold
Exp
2006 to 2022
Because I use an MVC architecture and I ensure that my components are weakly coupled if they are couple at all, unit testing is the best method for ensuring the overall system will meet the requirements and as further development progresses it tests for regressions. The final integration tests only need to ensure the display output (the view) is correct. My unit tests run all the time whenever the application runs. So each time I try a new feature the unit tests all run on all classes and warn me of any regressions. This ensure the overall system is working as it should. I tend to see unit test problems before any application level issues are noticed. Just today it caught a situation where I should be using === instead of == :D

Modern OO development using the MVC architecture backed by unit testing makes continuous testing/integration straight forward if configured up front. I am not a fan of agile, XP or scrum development methodologies as it is a bit too wild west for me, however I don't think the waterfall method is best suited to modern web development. I prefer something that is somewhere in the middle that does allow for changing specs and iteration but starts with a decent spec and a good understanding of the business you are developing for. That said I do like some of the tools that have been developed due to the agile and other more fluid management methodologies. I have utilised some of these with the aim of catching any bugs prior to the release of the software to the client.
Jargon - special words or expressions used by a profession or group that are difficult for others to understand.

Can we have that in English please?

At the end of the day it doesn't really matter what method of testing is used so long as it is comprehensive and works. My post #72 was somewhat in cheek but the fact remains that much of the software released today has not been properly tested.
 
Sep 23, 2013
2,583
8,736
Lincs
Funster No
28,231
MH
Globecar Campscout
Exp
Since 2008 (started in a VW T4 campervan)
Suprisingly users still manage to find ways to do things that you didn't think were possible, and then to make matters worse can never remember how they did it :mad:
After 30 years of application support, I am no longer surprised by the things users do. Baffled - frequently, but not surprised anymore.

Our systems have to interface with HMRC, banks & pension companies. The other thing that baffles me is some of the system design that goes on there.
 

GJH

LIFE MEMBER
Aug 20, 2007
29,450
38,827
Acklam, Teesside, originally Glossop
Funster No
127
MH
None, now sold
Exp
2006 to 2022
After 30 years of application support, I am no longer surprised by the things users do. Baffled - frequently, but not surprised anymore.
Been there many times :LOL:
The thing is, though, that it shouldn't matter what the users do. If the system is working to specification it will tell them to either RTFM or call support.

Subscribers  do not see these advertisements

 

Join us or log in to post a reply.

To join in you must be a member of MotorhomeFun

Join MotorhomeFun

Join us, it quick and easy!

Log in

Already a member? Log in here.

Latest journal entries

Funsters who are viewing this thread

Back
Top