• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Wanna dabble in basic programing

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
VB,C++,assembly
BASIC isn't used anymore.
I think he means he wants to do some basic (simple) programming, not necessarily using a form of BASIC.
VB is a terrible idea, C# is the most worth-while CLR language to learn as its grammar and syntax are almost identical to most languages that end statements with semi-colons.

For learning how to program, starting with a scripting language like Python (as others have suggested,) or with Ruby might be a better starting point. Languages like Java, C#, and C/C++ require a deeper understanding of how the computer works since you're starting to get closer to hardware. Languages like Ruby and Python will get you into good habits without making everything too difficult. PHP theoretically could be lumped together with Python and Ruby, but generally speaking it's a bad language to start with since it lets you do some very stupid things.
 
Joined
Sep 7, 2011
Messages
598 (0.13/day)
Location
Pacific Rim
Processor Ryzen 3600
Motherboard B450
Cooling Scythe Ashura
Memory Team Dark Z 3200 8GB x2
Video Card(s) MSI 390
Storage WD 2TB + WD Green 640GB
Display(s) Samsung 40JU6600 @ 200% scaling
Case Coolermaster CM 690 II
Audio Device(s) Fiio E10K, Graham Slee Solo II SRG, Sennheiser HD6XX, AKG K7XX, ATH WS1100is
Power Supply Corsair HX650
Mouse Rival 700
Keyboard Corsair K70, Razer Tarantula
I think he means he wants to do some basic (simple) programming, not necessarily using a form of BASIC.
VB is a terrible idea, C# is the most worth-while CLR language to learn as its grammar and syntax are almost identical to most languages that end statements with semi-colons.

For learning how to program, starting with a scripting language like Python (as others have suggested,) or with Ruby might be a better starting point. Languages like Java, C#, and C/C++ require a deeper understanding of how the computer works since you're starting to get closer to hardware. Languages like Ruby and Python will get you into good habits without making everything too difficult. PHP theoretically could be lumped together with Python and Ruby, but generally speaking it's a bad language to start with since it lets you do some very stupid things.
You're correct if the thread starter want to:
- learn basic programming with intention as a start line for learning even deeper or diverse
- learn good habit of programming
- have a lot of time to spare

If the goal is just one or two simple projects, not intended for full-on profession, I think it's better to learn those 'stupid' languages (VB or PHP) instead due to:
- shorter learning curve (it's kinda the easiest one)
- more forgiving - which stupid from another point of view but I'd argue he isn't doing extremely complex programming, so the debugging/error will be minimal.
- be productive in short time may encourage him to do more
 
  • Like
Reactions: xvi

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
If the goal is just one or two simple projects, not intended for full-on profession, I think it's better to learn those 'stupid' languages (VB or PHP) instead due to:
- shorter learning curve (it's kinda the easiest one)
- more forgiving - which stupid from another point of view but I'd argue he isn't doing extremely complex programming, so the debugging/error will be minimal.
- be productive in short time may encourage him to do more
Yes, but long term it could be demotivational because PHP doesn't enforce good programming practices. As a new dev, you might write a bunch of code but not know what's going on because PHP lets you do some pretty funky things. I can only recommend PHP if the web is where you plan on dev'ing and even then, PHP isn't an ending point. I have a special place in my heart for PHP. I love it because you can pump stuff out quick. I hate it because it easily can become a mess to manage.

I think VB is a better option than PHP because it's strongly typed and requires explicit type casts unlike PHP which is loosely typed. So in a CLR language, 1 + "1" would through an error, whereas in PHP: 1 + "1" would = 2 and is legitimate. Things like that make you consider the argument a little more where in PHP, you might not even stop to think if something is a string, an integer, or a float.

Now, if someone is interested in Web, I think Ruby is one of the best language to start with. Pair that with something like Sinatra, and you have a very simple web server that is very easy to understand and very easy to start with.

http://www.sinatrarb.com/

Edit: I agree with all your first points though. I do think anyone first starting is going to have a lot to learn, so time is a necessity.
 
Last edited:
  • Like
Reactions: xvi

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.65/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
So in a CLR language, 1 + "1" would through an error, whereas in PHP: 1 + "1" would = 2 and is legitimate.
You're wrong there:
Code:
Module Module1
    Sub Main()
        Console.WriteLine(1 + "1") ' 2
        Console.ReadKey()
    End Sub
End Module
.NET automatically tries to convert "1" to Double and it succeeds. Now, if it was "a1" making that conversion invalid, it would fail at runtime.
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
You're wrong there:
Code:
Module Module1
    Sub Main()
        Console.WriteLine(1 + "1") ' 2
        Console.ReadKey()
    End Sub
End Module
.NET automatically tries to convert "1" to Double and it succeeds. Now, if it was "a1" making that conversion invalid, it would fail at runtime.

I stand corrected. It's strictly typed by it does type casts for you. Was that still the case 6 years ago? It's been a while since I've really written any C# or VB.

Doing something like this in Ruby or Python will actually type error because an explicit cast is required by the language. PHP is even more weird because the order can determine the cast, making addition not commutative between distinct types, JS is similar to PHP in that respect as well.
 
Last edited:

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,436 (2.43/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
.NET automatically tries to convert "1" to Double and it succeeds. Now, if it was "a1" making that conversion invalid, it would fail at runtime.

Why would anyone find that useful? "1" should never equal 1.
 

Ahhzz

Moderator
Staff member
Joined
Feb 27, 2008
Messages
8,709 (1.48/day)
System Name OrangeHaze / Silence
Processor i7-13700KF / i5-10400 /
Motherboard ROG STRIX Z690-E / MSI Z490 A-Pro Motherboard
Cooling Corsair H75 / TT ToughAir 510
Memory 64Gb GSkill Trident Z5 / 32GB Team Dark Za 3600
Video Card(s) Palit GeForce RTX 2070 / Sapphire R9 290 Vapor-X 4Gb
Storage Hynix Plat P41 2Tb\Samsung MZVL21 1Tb / Samsung 980 Pro 1Tb
Display(s) 22" Dell Wide/24" Asus
Case Lian Li PC-101 ATX custom mod / Antec Lanboy Air Black & Blue
Audio Device(s) SB Audigy 7.1
Power Supply Corsair Enthusiast TX750
Mouse Logitech G502 Lightspeed Wireless / Logitech G502 Proteus Spectrum
Keyboard K68 RGB — CHERRY® MX Red
Software Win10 Pro \ RIP:Win 7 Ult 64 bit
Oooonnneeeee!!! Is the loneliest number....
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
Why would anyone find that useful? "1" should never equal 1.
His point was to say that I was wrong, which I was. However, if you actually ever do something like this...
wat-gigantic-duck.jpg

https://www.destroyallsoftware.com/talks/wat
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.65/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
I stand corrected. It's strictly typed by it does type casts for you. Was that still the case 6 years ago? It's been a while since I've really written any C# or VB.
In C#, + is concatenation when there is a string involved; + is additive when there is numeric types involved so...
Code:
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(1 + "1"); // 11
            Console.ReadKey();
        }
    }
}
There is no way to make 1 + "1" = 2 in C# without explicitly converting "1" to a numeric type.

VB 1 & "1" == C# 1 + "1"
VB 1 + "1" == C# 1 + Convert.ToInt32("1")

One could create a C# overloads so that integer + string attempts to add like VB but not much point in doing that.
 
Joined
Sep 27, 2012
Messages
31 (0.01/day)
System Name PC_3770K
Processor Intel 3770K
Motherboard Asus Maximus Gene V
Cooling Cooler Master Hyper 212 EVO
Memory Kingston HyperX 8GB DDR3 @2400MHz
Video Card(s) ZOTAC GeForce GTX 1080 Mini
Storage Samsung 850 Pro 256GB / WD 320GB + SEAGATE 500GB
Display(s) DELL U2713HM 27"@2560*1440
Case Corsair Obsidian 350D MATX
Audio Device(s) Integrated Asus SupremeFX III
Power Supply Seasonic Modular G Series 550W
Mouse Asus Rog Sica
Keyboard Redragon Devarajas Mechanical KB
Software Windows 10 Home x64
In C#, 1+"1" would be 11, a integer and a string are not added, are concatenated. + sign represents concatenations, the integer is converted to a string.
 

ntgamers

New Member
Joined
Apr 6, 2015
Messages
6 (0.00/day)
Some real advice ignoring what everyone else has said is to find something you are actually interested in working on, choose the language that fits the best features that meet the project that you want to work on's needs. Your goal shouldn't be to learn programming, your goal should be to complete a programming project that you would find enjoyable to work on everything else will come in due time.
 
Top