Learning a Programming Language

FarligOpptreden

Executive Member
Joined
Mar 5, 2007
Messages
5,396
[)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.
 

[)roi(]

Executive Member
Joined
Apr 15, 2005
Messages
6,282
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.
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
42,920
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.
 

Binary_Bark

Forging
Joined
Feb 24, 2016
Messages
38,582
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.
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
42,920
insert into a106_pipe VALUES ('6','10.3','1.73','2.41','0');
 

Binary_Bark

Forging
Joined
Feb 24, 2016
Messages
38,582
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.
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
42,920
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:

czc

Honorary Master
Joined
Dec 2, 2008
Messages
12,013
Shouldn't you use Float for the decimal values?
 

Binary_Bark

Forging
Joined
Feb 24, 2016
Messages
38,582

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.
 

Binary_Bark

Forging
Joined
Feb 24, 2016
Messages
38,582
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);
 

Oppiekoffie

Expert Member
Joined
Oct 25, 2016
Messages
1,468
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.
 

[)roi(]

Executive Member
Joined
Apr 15, 2005
Messages
6,282
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.

Ratingtiobe.comfossbytes.comspectrum.ieee.orgpypl.github.iohackerearth.comstackoverflow.comgithub.comindeed.co.inglassdoor.co.inupwork.com
1JavaJavascriptCJavaJavascriptJavascriptJavascriptJavaJavaNatural Language Processing
2CJavaJavaPythonJavaSQLJavaJavascriptCSwift
3C++PythonPythonPHPPythonJavaPythonPHPJavascriptTableau
4C#RubyC++C#PHPC#RubyCSSPHPAmazon Marketplace Web Services
5PythonPHPRJavascriptRPHPPHPRPythonStripe
6VB.NetC++C#CMATLABPythonC++C#CSSInstagram Marketing
7JavascriptC#PHPC++ArduinoC++CSSC++PerlMySQL
8PerlGoJavascriptObjective-CSwiftAngularJSC#PythonRUnbounce
9ASMScalaRubyR-NodeJSCShellC#Social Media Management
10PHPSwiftGoSwift-CGoPerlC++AngularJS
11Delphi--MATLAB-RubyShellObjective-CObjective-CBusiness Computing
12Ruby--Ruby-Objective-CObjective-CRubyRubyMachine Learning
13Go--Visual Basic--ScalaVisual BasicVisual BasicBrand Strategy
14Swift--VBA--SwiftMATLABShell3D Rendering
15Visual Basic--Scala--TypescriptASMMATLABInformation Security
16R--Perl-----R
17Dart--LUA-----NodeJS
18Objective-C Basic--Go-----UX design
19MATLAB--Delphi-----Bluetooth
20PL/SQL--Haskell-----Zendesk
 

Oppiekoffie

Expert Member
Joined
Oct 25, 2016
Messages
1,468
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.
 

Willie Trombone

Honorary Master
Joined
Jul 18, 2008
Messages
60,038
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.
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
21,885
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