Learning a Programming Language

[)roi(];19026488 said:
As for the OP's question.
Almost any language can accomplish what you've described; so you might want to rather base your decision on teh reason why you want to learn to program; what's your end goal?

For a job in SA?
  • Then maybe base your decsions on the job market, etc.
For study:
  • Then the curriculum usually dictates that.
You mentioned a mobile app down the line; if that's for:
  • Android then it's Java
  • Windows then it's C# or F#
  • Apple, then it's Objective-C or Swift
Those are just the the mainstream options for those platforms, however you can build for them with non mainstream languages as well.

You know, you can standardise the language across desktop, web, Android and iOS to JavaScript if you opt for Node.js. You can use Electron for desktop, React for web and ReactNative for the mobile apps. It makes the sharing of your code base so much easier if you stick to one language and runtime.

OP, there's a huge push towards Node.js both internationally and locally at the moment. It might be worthwhile looking into it. You can then use ES6 / ES2015 like all the cool kids are doing. You can achieve your targeted app using JavaScript in all its various flavours.
 
You know, you can standardise the language across desktop, web, Android and iOS to JavaScript if you opt for Node.js. You can use Electron for desktop, React for web and ReactNative for the mobile apps. It makes the sharing of your code base so much easier if you stick to one language and runtime.

OP, there's a huge push towards Node.js both internationally and locally at the moment. It might be worthwhile looking into it. You can then use ES6 / ES2015 like all the cool kids are doing. You can achieve your targeted app using JavaScript in all its various flavours.
I'm sure I covered that... i.e. non mainstream options.

Beyond that it's your opinion (I disagree)... and we've had enough of those threads.
 
You know, you can standardise the language across desktop, web, Android and iOS to JavaScript if you opt for Node.js. You can use Electron for desktop, React for web and ReactNative for the mobile apps. It makes the sharing of your code base so much easier if you stick to one language and runtime.

That's like saying we should all just used sporks because they work for breakfast, lunch, dinner, starters, mains and desert.
 
Some help Please, busy with this for a database table:

CREATE TABLE a106_pipe (
Item_ID int GENERATED ALWAYS AS IDENTITY not null primary key,
"NB" INTEGER NOT NULL (25),
"O/D" INTEGER (25),
"SCH 40" INTEGER (25),
"SCH 80" INTEGER (30),
"SCH 160" INTEGER default 0,
PRIMARY KEY (ITEM_ID)
);
insert into a106_pipe ('6','10.3','1.73','2.41','0');
insert into a106_pipe ('8','13.7','2.24','3.02','0');
insert into a106_pipe ('10','17.1','2.31','3.20','0');

Getting this error:

[Warning, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY not null primary key,
"NB" INTEGER not null (25),
"O/D" INTEGER (25),
' at line 2

[Exception, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY not null primary key,
"NB" INTEGER not null (25),
"O/D" INTEGER (25),
' at line 2
Line 1, column 1

[Warning, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''6','10.3','1.73','2.41','0')' at line 1

[Exception, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''6','10.3','1.73','2.41','0')' at line 1
Line 10, column 1

[Warning, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''8','13.7','2.24','3.02','0')' at line 1

[Exception, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''8','13.7','2.24','3.02','0')' at line 1
Line 11, column 1

[Warning, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''10','17.1','2.31','3.20','0')' at line 1

[Exception, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''10','17.1','2.31','3.20','0')' at line 1
Line 12, column 1

Execution finished after 0.13 s, 4 errors occurred.
 
insert into a106_pipe VALUES ('6','10.3','1.73','2.41','0');
 
insert into a106_pipe VALUES ('6','10.3','1.73','2.41','0');

Thanks,

Changed the script to:

CREATE TABLE IF NOT EXISTS 'a106_pipe'
(
Item_ID int GENERATED ALWAYS AS IDENTITY not null primary key,
'NB' INTEGER not null primary key,
'O/D' INTEGER,
'SCH_40' INTEGER,
'SCH_80' INTEGER,
'SCH_160' INTEGER default 0,
PRIMARY KEY (ITEM_ID)
);
insert into a106_pipe VALUES ('6','10.3','1.73','2.41','0');
insert into a106_pipe VALUES ('8','13.7','2.24','3.02','0');
insert into a106_pipe VALUES ('10','17.1','2.31','3.20','0');

But now get this:

[Warning, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a106_pipe'
(
Item_ID int GENERATED ALWAYS AS IDENTITY not null primary key,
'NB' at line 1

[Exception, Error code 1,064, SQLState 42000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a106_pipe'
(
Item_ID int GENERATED ALWAYS AS IDENTITY not null primary key,
'NB' at line 1
Line 1, column 1

[Warning, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist

[Exception, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist
Line 11, column 1

[Warning, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist

[Exception, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist
Line 12, column 1

[Warning, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist

[Exception, Error code 1,146, SQLState 42S02] Table 'a106_pipe.a106_pipe' doesn't exist
Line 13, column 1

Execution finished after 0.12 s, 4 errors occurred.
 
I'm not too clued up on MySql specific syntax but your create table looks funny.

Why are you setting the primary key three times?)
Why are you placing the column names between single quotes?

Try this:
Code:
CREATE TABLE IF NOT EXISTS 'a106_pipe'
 (
 ITEM_ID int not null auto_increment,
 NB INTEGER not null,
 OD INTEGER, 
 SCH_40 INTEGER,
 SCH_80 INTEGER,
 SCH_160 INTEGER default 0,
 PRIMARY KEY (ITEM_ID)
 );

If you need to set both ITEM_ID and NB as a composite primary key then you can do something like this:
Code:
PRIMARY KEY (ITEM_ID, NB)

You'll need to test it though and go through a couple of tutorials.

EDIT: Your inserts probably won't work either because you defined the columns as INTEGER but are inserting the values as strings/VARCHAR. Remove the single quotes.
 
Last edited:

Almost got it going, tried this:
Code:
CREATE TABLE a106_pipe
 (
 NB INTEGER not null primary key,
 OD INTEGER , 
 SCH_40 INTEGER ,
 SCH_80 INTEGER ,
 SCH_160 INTEGER default 0
 );
insert into a106_pipe values ('6','10.3','1.73','2.41','0');
insert into a106_pipe values ('8','13.7','2.24','3.02','0');
insert into a106_pipe values ('10','17.1','2.31','3.20','0');
insert into a106_pipe values ('15','21.3','2.87','3.91','5.56');

But now this error:

Executed successfully in 0.04 s.
no rows affected.
Line 1, column 1


[Exception, Error code 30,000, SQLState 42821] Columns of type 'INTEGER' cannot hold values of type 'CHAR'.
Line 9, column 1


[Exception, Error code 30,000, SQLState 42821] Columns of type 'INTEGER' cannot hold values of type 'CHAR'.
Line 10, column 1


[Exception, Error code 30,000, SQLState 42821] Columns of type 'INTEGER' cannot hold values of type 'CHAR'.
Line 11, column 1


[Exception, Error code 30,000, SQLState 42821] Columns of type 'INTEGER' cannot hold values of type 'CHAR'.
Line 12, column 1

Execution finished after 0.125 s, 4 errors occurred.
 
Remove single quotes.

Worked Thanks, now also working on the SQL:

Code:
CREATE TABLE a106_pipe
 (
 NB INTEGER not null primary key,
 OD INTEGER , 
 SCH_40 INTEGER ,
 SCH_80 INTEGER ,
 SCH_160 INTEGER default 0
 );
insert into a106_pipe values (6,10.3,1.73,2.41,0);
insert into a106_pipe values (8,13.7,2.24,3.02,0);
insert into a106_pipe values (10,17.1,2.31,3.20,0);
insert into a106_pipe values (15,21.3,2.87,3.91,5.56);
 
Start with suggested ones, Java is good. Starting is mostly sybtax, operators, inheritance, classes, statements, flow control etc. SAme for java, C#, C++ etc with a few differences. As for popular languages, java, C# are right up there. Also add others to your knowledge. In 10 years you may find your language isn't that relevant anymore. EG Delphi. Also learn databases, MS SQL, MySQL.
 
Start with suggested ones, Java is good. Starting is mostly sybtax, operators, inheritance, classes, statements, flow control etc. SAme for java, C#, C++ etc with a few differences. As for popular languages, java, C# are right up there. Also add others to your knowledge. In 10 years you may find your language isn't that relevant anymore. EG Delphi. Also learn databases, MS SQL, MySQL.

"Popularity" is dependent on reference.

[table="width: 200, class: grid"]
[tr]
[td]Rating[/td]
[td]tiobe.com[/td]
[td]fossbytes.com[/td]
[td]spectrum.ieee.org[/td]
[td]pypl.github.io[/td]
[td]hackerearth.com[/td]
[td]stackoverflow.com[/td]
[td]github.com[/td]
[td]indeed.co.in[/td]
[td]glassdoor.co.in[/td]
[td]upwork.com[/td]

[/tr]
[tr]
[td]1[/td]
[td]Java[/td]
[td]Javascript[/td]
[td]C[/td]
[td]Java[/td]
[td]Javascript[/td]
[td]Javascript[/td]
[td]Javascript[/td]
[td]Java[/td]
[td]Java[/td]
[td]Natural Language Processing[/td]
[/tr]
[tr]
[td]2[/td]
[td]C[/td]
[td]Java[/td]
[td]Java[/td]
[td]Python[/td]
[td]Java[/td]
[td]SQL[/td]
[td]Java[/td]
[td]Javascript[/td]
[td]C[/td]
[td]Swift[/td]
[/tr]
[tr]
[td]3[/td]
[td]C++[/td]
[td]Python[/td]
[td]Python[/td]
[td]PHP[/td]
[td]Python[/td]
[td]Java[/td]
[td]Python[/td]
[td]PHP[/td]
[td]Javascript[/td]
[td]Tableau[/td]
[/tr]
[tr]
[td]4[/td]
[td]C#[/td]
[td]Ruby[/td]
[td]C++[/td]
[td]C#[/td]
[td]PHP[/td]
[td]C#[/td]
[td]Ruby[/td]
[td]CSS[/td]
[td]PHP[/td]
[td]Amazon Marketplace Web Services[/td]
[/tr]
[tr]
[td]5[/td]
[td]Python[/td]
[td]PHP[/td]
[td]R[/td]
[td]Javascript[/td]
[td]R[/td]
[td]PHP[/td]
[td]PHP[/td]
[td]R[/td]
[td]Python[/td]
[td]Stripe[/td]
[/tr]
[tr]
[td]6[/td]
[td]VB.Net[/td]
[td]C++[/td]
[td]C#[/td]
[td]C[/td]
[td]MATLAB[/td]
[td]Python[/td]
[td]C++[/td]
[td]C#[/td]
[td]CSS[/td]
[td]Instagram Marketing[/td]
[/tr]
[tr]
[td]7[/td]
[td]Javascript[/td]
[td]C#[/td]
[td]PHP[/td]
[td]C++[/td]
[td]Arduino[/td]
[td]C++[/td]
[td]CSS[/td]
[td]C++[/td]
[td]Perl[/td]
[td]MySQL[/td]
[/tr]
[tr]
[td]8[/td]
[td]Perl[/td]
[td]Go[/td]
[td]Javascript[/td]
[td]Objective-C[/td]
[td]Swift[/td]
[td]AngularJS[/td]
[td]C#[/td]
[td]Python[/td]
[td]R[/td]
[td]Unbounce[/td]
[/tr]
[tr]
[td]9[/td]
[td]ASM[/td]
[td]Scala[/td]
[td]Ruby[/td]
[td]R[/td]
[td]-[/td]
[td]NodeJS[/td]
[td]C[/td]
[td]Shell[/td]
[td]C#[/td]
[td]Social Media Management[/td]
[/tr]
[tr]
[td]10[/td]
[td]PHP[/td]
[td]Swift[/td]
[td]Go[/td]
[td]Swift[/td]
[td]-[/td]
[td]C[/td]
[td]Go[/td]
[td]Perl[/td]
[td]C++[/td]
[td]AngularJS[/td]
[/tr]
[tr]
[td]11[/td]
[td]Delphi[/td]
[td]-[/td]
[td]-[/td]
[td]MATLAB[/td]
[td]-[/td]
[td]Ruby[/td]
[td]Shell[/td]
[td]Objective-C[/td]
[td]Objective-C[/td]
[td]Business Computing[/td]
[/tr]
[tr]
[td]12[/td]
[td]Ruby[/td]
[td]-[/td]
[td]-[/td]
[td]Ruby[/td]
[td]-[/td]
[td]Objective-C[/td]
[td]Objective-C[/td]
[td]Ruby[/td]
[td]Ruby[/td]
[td]Machine Learning[/td]
[/tr]
[tr]
[td]13[/td]
[td]Go[/td]
[td]-[/td]
[td]-[/td]
[td]Visual Basic[/td]
[td]-[/td]
[td]-[/td]
[td]Scala[/td]
[td]Visual Basic[/td]
[td]Visual Basic[/td]
[td]Brand Strategy[/td]
[/tr]
[tr]
[td]14[/td]
[td]Swift[/td]
[td]-[/td]
[td]-[/td]
[td]VBA[/td]
[td]-[/td]
[td]-[/td]
[td]Swift[/td]
[td]MATLAB[/td]
[td]Shell[/td]
[td]3D Rendering[/td]
[/tr]
[tr]
[td]15[/td]
[td]Visual Basic[/td]
[td]-[/td]
[td]-[/td]
[td]Scala[/td]
[td]-[/td]
[td]-[/td]
[td]Typescript[/td]
[td]ASM[/td]
[td]MATLAB[/td]
[td]Information Security[/td]
[/tr]
[tr]
[td]16[/td]
[td]R[/td]
[td]-[/td]
[td]-[/td]
[td]Perl[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]R[/td]
[/tr]
[tr]
[td]17[/td]
[td]Dart[/td]
[td]-[/td]
[td]-[/td]
[td]LUA[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]NodeJS[/td]
[/tr]
[tr]
[td]18[/td]
[td]Objective-C Basic[/td]
[td]-[/td]
[td]-[/td]
[td]Go[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]UX design[/td]
[/tr]
[tr]
[td]19[/td]
[td]MATLAB[/td]
[td]-[/td]
[td]-[/td]
[td]Delphi[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]Bluetooth[/td]
[/tr]
[tr]
[td]20[/td]
[td]PL/SQL[/td]
[td]-[/td]
[td]-[/td]
[td]Haskell[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]-[/td]
[td]Zendesk[/td]
[/tr]
[/table]
 
Interesting. Talking about SA specifically. C# and Java up there. Thats if you look at the advertising on the recruitment sites. Thats where the most shortages are. Mobile languages should be taking over. But then the SA market isn't China/US,UK. Falling behind on skills, few new skilled knowledgeables come through. the last time I worked with a young dev was 8 years ago. After that mid to late 30s.
 
Interesting. Talking about SA specifically. C# and Java up there. Thats if you look at the advertising on the recruitment sites. Thats where the most shortages are. Mobile languages should be taking over. But then the SA market isn't China/US,UK. Falling behind on skills, few new skilled knowledgeables come through. the last time I worked with a young dev was 8 years ago. After that mid to late 30s.

It's more than SA - I'd also argue formal sector vs informal.
 
Would be used on a desktop, data will reside in the app itself, with later transference to mobile app also

Get a copy of Visual Studio Express and SQL Server Express

Then download Northwind Database and attach it. If you don't know how just ask here.

Then in visual studio, create a Form with lets say a ComboBox/DataGridView and try to connect your project to SQL Server and populate some data from Northwind into them.

You can make things a bit more funky by filtering the DataGridView with whatever you select in the ComboBox and then add a few TextBoxes to show the data from the row you have selected in the DataGridView.

After that the next step is to add a Save/Delete button and work on being able to actually edit the data in the database.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X