My Experience learning Python and SQL
Tags: python, sql
Published: 2023-09-22 20:18:47

> This blog is based off my Phase-3 learning exerience at flatiron school.

##Introduction

After learning JavaScript and React.js I anticipated that React.js would become my preferred language due to its aesthetic appeal. However, upon gaining better familiarity with Python, my perspective shifted. Python's clean and efficient design made it stand out, making the coding experience feel less cluttered and more intuitive.

Prior to enrolling at Flatiron School, my exposure to programming was limited to Python. I learned Python through Zed A. Shaw's book, "Learn Python the Hard Way Third Edition." This resource was invaluable in imparting fundamental knowledge, and I enjoyed experimenting with creating small programs, such as file sorters and terminal games. However, my journey at Flatiron School exposed me to a new side of Python, especially in conjunction with SQL. I had minimal prior exposure to databases, erroneously perceiving them as primarily utilized by large corporations. To my surprise, setting up and working with databases, especially when integrated with Python, was far more accessible and user-friendly than I had initially envisioned.

## Learning about Python

Exploring Python from multiple perspectives has given me a deeper appreciation for why it is highly regarded in the programming community. Its versatility is striking, and despite my ongoing learning journey, I have already encountered a multitude of features that appeal to me. Among these features, the capability to employ pass for creating a preliminary outline and the flexibility of utilizing different loop types like range loops stand out to me as tools I anticipate using frequently. This functionality allows for the easy creation of an initial structure, providing a clear roadmap for future development and refinement. As I continue to broaden my Python knowledge, I anticipate uncovering even more facets of this multifaceted language.
```
def function_a():
    pass

def function_b(number_of_hello, name):
    for range(number_of_hello):
        print(f"Hello {name}!")
```

## Learning about SQL

Structured Query Language (SQL) provided a refreshing departure from conventional programming languages. The simplicity and logical structure of SQL made it highly comprehensible and facilitated a sense of organization and expansiveness in projects. Working in tandem with Python, SQL elevated the dynamism and organization of projects, even for smaller-scale applications. I found SQL's syntax to be remarkably self-explanatory, exemplified by statements like:
```
SELECT x
FROM y
WHERE z = ?
```
Leveraging SQL in conjunction with Python proved to be a potent combination, offering tremendous capabilities. Although I acknowledge that I still have much to learn and explore in this realm, establishing a robust foundation in SQL and Python provides me with a clear trajectory for further growth and development.

## Learning about ORM

Object-Relational Mapping (ORM) is the technique of accessing a relational database using an object-oriented programming language. Utilizing Structured Query Language (SQL) and Python in conjunction to craft an ORM significantly streamlines the process of coding a program, enhancing overall efficiency and ease of development. Here is a poignant quote from Flatiron that clarified the concept of ORM for me:

"An ORM is really just a concept. It is a design pattern, a conventional way for us to organize our programs when we want those programs to connect to a database. The convention is this:

When "mapping" our program to a database, we equate classes with database tables, and instances of those classes with table rows.

You may also see this referred to as "wrapping" a database, because we are writing Python code that "wraps" or handles SQL." -Flatiron School

When constructing my ORM's, I have predominantly employed Sqlite but also explored SQLAlchemy. Both of these tools have proven highly valuable in aiding my familiarity with SQL and ORMs. Utilizing these tools significantly reduces the need for excessive boilerplate code that often accompanies writing an ORM, thus further streamlining the process.

## Conclusion

I have thoroughly enjoyed my experience at Flatiron thus far, and I wish I had more time to completely immerse myself in my curriculum, as I find programming exceptionally fulfilling. While there are various resources available for learning programming free of charge, I am genuinely appreciative of the opportunity I was given to learn from Flatiron. The guidance and support from Flatiron have not only been instrumental in my programming education but have also been invaluable in imparting non-programming aspects, such as being an active part of a community, preparing for job interviews, developing good foundational habits, and effective strategies for learning new programming languages. Now that I have established a solid foundation with Python, SQL, and JS/React.js, I am eagerly anticipating the chance to apply all that I've learned in a meaningful project.