How do I learn programming, particularly bash shell scripting and SQL?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary
The discussion centers around the challenges of learning programming, particularly bash shell scripting, and the perceived inability to problem-solve. Participants emphasize the importance of reframing negative self-talk, as it can hinder progress. They argue that programming skills exist on a continuum, and even small efforts contribute to overall knowledge. To learn programming effectively, it is suggested to break down problems into smaller, manageable parts and focus on incremental learning. Engaging with mentors or peers can provide valuable guidance. The conversation highlights the necessity of hands-on practice, as theoretical knowledge alone is insufficient. Additionally, participants recommend starting with basic concepts before tackling more complex projects, emphasizing the importance of foundational skills in HTML, CSS, and JavaScript before attempting full-stack development. Resources like online courses and coding examples are encouraged to build a solid understanding. Ultimately, consistent practice and a willingness to learn from failures are deemed essential for success in programming.
  • #31
shivajikobardan said:
One of the biggest defects that I've is that I can't solve problems. Make a snake game? I've no idea how to proceed. Build a tic tac toe, I've no idea how to proceed. Build a arkanoid, I've no idea how to proceed. I read about them, I read the code, I still have no idea what is going on. I try to watch tutorial, I've no idea why are they doing it. I try to search stackoverflow, I don't understand why that solution works and how to develop that solution on your own. I don't know data structures and algorithms yet, so I wonder if that's what is hindering my coding development. Maybe practicing leetcode could help.
There's no magic solution. The only way to learn is to do these things. If the tutorial doesn't make sense, do it again. Go through the example code line by line and figure out what every line is doing. Make sure you have a good reference for whatever language you're working in. I use C Sharp a lot so I make sure to have a 300-400 page book nearby that explains most of the language and has plenty of example code and mini-projects.
 
  • Like
Likes berkeman and Vanadium 50
Technology news on Phys.org
  • #32
shivajikobardan said:
I don't think I'll get time for it.
Then what's the point of asking if you don't have time to do any of it?

Becoming good at programming - or anything, really - requires time and effort. If you don't put the time and effort in, you won't improve.
 
  • Like
Likes PeterDonis and berkeman
  • #33
shivajikobardan said:
One of the biggest defects that I've is that I can't solve problems. Make a snake game? I've no idea how to proceed. Build a tic tac toe, I've no idea how to proceed. Build a arkanoid, I've no idea how to proceed. I read about them, I read the code, I still have no idea what is going on. I try to watch tutorial, I've no idea why are they doing it. I try to search stackoverflow, I don't understand why that solution works and how to develop that solution on your own. I don't know data structures and algorithms yet, so I wonder if that's what is hindering my coding development. Maybe practicing leetcode could help.
shivajikobardan said:
I've not started them yet. Now, I've a job that requires me to learn linux and sql, I don't think I'll get time for it. Even though I've holidays on saturdays and fridays, I've to learn linux and sql because that's what the job requires.
Congratulations on the new job; please do your best.

We have been down this discussion path before with you, and we've done all that we can. This thread is closed.
 
  • Like
Likes Wrichik Basu
  • #34
Most programmers learn the basics of Linux ie the commands for the command line. Many are similar to Windows DOS commands and so the transition is made easier. From there they branch into using vi so you can edit files and then to the basics bash scripting with command line arguments echo statements…

Fancier bash stuff usually doesn’t come into play initially. When the fancier stuff is needed is when I switch to either AWK to get some value from some file or to a python implementation of the tricky part of even the whole script. BASH fancy coding can be very tricky and simple is better. BASH can become a write only script where you really have to understand it to figure out whats going on not so much with python.

Similarly for SQL, one learns how to write simple SELECT queries against an existing table in a database and then combining tables using a common key. The next level is using the grouping or sorting feature of the SELECT statement. The most advanced SQL that I've seen has been where you write SQL to write SQL that does the job you need. Sometimes this entails reading the metatables that control the overall database (tables that have schema names, table names, column names, types ... that could be used to manage or reorganize the database.

Chances are thought any job that requires knowledge of SQL is limited to more basic SQL knowledge like the SELECT, INSERT, UPDATE, and DELETE statements and depending on the database the UPSERT statement which is a combined INSERT if not present or UPDATE if present.

Database Admin

As you expand your knowledge of SQL to the DESCRIBE statement to get info on table columns and the EXPLAIN statement to understand how a complex SELECT statement did its job.

Further depth in SQL is learning how to optimize queries with index tables and other tricks like backing up databases and restoring them.

Database Designer

Database designers learn how to design a collection of tables ie a schema to hold your data in an optimal way With no duplicated data. The most common schema is the star schema where you have a central fact table with smaller dimension tables connected by common keys.

https://en.wikipedia.org/wiki/Star_schema

As a simple example, an inventory of your personal books. The fact table would have a row for each book with its title, field or DDS #, year of publication, author-id key, publisher-id key. Associated with the fact table would two dimension tables one for author info like author-id, author name, and other related author info like a bio And another similar table for publishers that include a publisher-id, and name. The id fields are what binds the dimension tables to the fact table and can be used in a SELECT statement to retrieve the author name for each book of interest.

Programmers can quickly learn SELECT statements and then learn the others as they progress.

But like I said programmers usually pick these up on the job not thru any course of study. There are some Linux, bash and SQL cookbooks for them as well.
 
Last edited:

Similar threads

Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 43 ·
2
Replies
43
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
86
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K