Here is a link to my progress:
http://www.codecademy.com/anicholakos
On Monday and Tuesday I was mainly working with lists which was pretty easy, they are what they sound like and they were not too confusing although I mess up the index of them a lot. Sometimes I forget about the zeroth element or like one time when I was told to separate a string with "catdogfrog" and when I sorted it I printed "rog" instead of "frog". That was an easy unit though.
On Wednesday I was introduced to for loops which are pretty easy right now but I imagine will get harder. I mess up the indents a lot though which is really frustrating but whatever.
Thursday and Friday I learned about dictionaries which is a pretty tough concept when combined with for loops but I am slowly making progress.
Friday, December 20, 2013
Friday, December 13, 2013
Thursday, December 5, 2013
Python
I don't really know what I should be doing but I have been working on learning some python to better understand peewee so I can continue with that, but if you want I can do something else. Anyway, I'm more than a quarter done with the code academy tutorial and that's about it.
Wednesday, December 4, 2013
Peewee
I got peewee but I don't quite know how to use it so I went to code academy to learn python. I finished unit 3, I think it's good to learn python because I never really learned much at YHS
Monday, December 2, 2013
Peewee
I looked at the peewee link you provided in your last comment and I also read some of a wikipedia page for object-relational mapping. The wiki page makes a little sense to me and the beginner tutorial for peewee is pretty fast paced because i think it's assumed that the reader knows python to a good extent but I understood some of it. Anyways, it seems very useful and I will continue looking at it.
Tuesday, November 26, 2013
PRAGMA Statements
I don't really know what the deal is with the pragma statement but for some reason it automatically placed it when I used the dump command along with the commit statement. I'm assuming it just removes the foreign key restriction judging from what sqlite.org said.
"As of SQLite version 3.6.19, the default setting for foreign key enforcement is OFF. However, that might change in a future release of SQLite. The default setting for foreign key enforcement can be specified at compile-time using the SQLITE_DEFAULT_FOREIGN_KEYS preprocessor macro. To minimize future problems, applications should set the foreign key enforcement flag as required by the application and not depend on the default setting." http://www.sqlite.org/pragma.html
"As of SQLite version 3.6.19, the default setting for foreign key enforcement is OFF. However, that might change in a future release of SQLite. The default setting for foreign key enforcement can be specified at compile-time using the SQLITE_DEFAULT_FOREIGN_KEYS preprocessor macro. To minimize future problems, applications should set the foreign key enforcement flag as required by the application and not depend on the default setting." http://www.sqlite.org/pragma.html
Friday, November 22, 2013
Querying Data
Instead of adding more values I tried querying data because before the results I was getting had a lot of repeating data. I was surprised and very happy to figure out how to restrict results to just one name and one movie. Here are some scripts I made to query data.
This one restricts the search to a person's first name, Hank, and lists their name along with their ID, Title of the movie and its ID.
https://dl.dropboxusercontent.com/u/8028799/movie_query1.sql
This one restricts the search to a person's last name, Krabs, and lists their full name with only the title of the movie.
https://dl.dropboxusercontent.com/u/8028799/movie_query2.sql
This one was difficult to get working but it lists any results whose name starts with an "A" but only shows the movies they like that have an ID less than 8, but it also shows results for people with a last name that starts with "H" and any movie that ends with an "s".
https://dl.dropboxusercontent.com/u/8028799/movie_query3.sql
This one restricts the search to a person's first name, Hank, and lists their name along with their ID, Title of the movie and its ID.
https://dl.dropboxusercontent.com/u/8028799/movie_query1.sql
This one restricts the search to a person's last name, Krabs, and lists their full name with only the title of the movie.
https://dl.dropboxusercontent.com/u/8028799/movie_query2.sql
This one was difficult to get working but it lists any results whose name starts with an "A" but only shows the movies they like that have an ID less than 8, but it also shows results for people with a last name that starts with "H" and any movie that ends with an "s".
https://dl.dropboxusercontent.com/u/8028799/movie_query3.sql
Thursday, November 21, 2013
Movie Database
I added more values mainly to the likes table so the database is basically done now. Also, when I tried to query info I got more data than I wanted but besides that everything is fine.
https://dl.dropboxusercontent.com/u/8028799/movie_likes_insertscript.sql
https://dl.dropboxusercontent.com/u/8028799/movie_likes_insertscript.sql
Wednesday, November 20, 2013
Movie Database
I spent most of the day adding more values to the database and I also messed around with selecting different values. This is the updated insert script.
Insert Code
Insert Code
Tuesday, November 19, 2013
SQL Movie Database
I started on the database for list of movies people like and I got pretty far. I made 2 files, 1 to make the tables and another to insert values. This is it so far.
Tables
Values
When you select the likes table you currently get people's ID's matched with the ID's of movies they like.
sqlite> select * from likes;
3|1
1|2
2|2
3|3
I'll also add some more values later.
Tables
Values
When you select the likes table you currently get people's ID's matched with the ID's of movies they like.
sqlite> select * from likes;
3|1
1|2
2|2
3|3
I'll also add some more values later.
Monday, November 18, 2013
SQL Files
Here is the code for the database:
https://dl.dropboxusercontent.com/u/8028799/export_destination.sql
https://dl.dropboxusercontent.com/u/8028799/product.sql
https://dl.dropboxusercontent.com/u/8028799/sales_statement.sql
https://dl.dropboxusercontent.com/u/8028799/sales.sql
I think it is all working so I will start on that new database ASAP
https://dl.dropboxusercontent.com/u/8028799/export_destination.sql
https://dl.dropboxusercontent.com/u/8028799/product.sql
https://dl.dropboxusercontent.com/u/8028799/sales_statement.sql
https://dl.dropboxusercontent.com/u/8028799/sales.sql
I think it is all working so I will start on that new database ASAP
Thursday, November 14, 2013
SQL
Pretty sure I figured out how to use the dump command and I made some different tables and practiced queering different data. I am excited to write the book and I will try to write the book similar to how you wrote yours because it was very easy to understand your books. I'll try to learn other things that could be relevant to write in the book and I will continue practicing.
SQL
I think I mostly understand primary keys and a little of foreign keys so the database is complete, I think. I also thought I understood how to use the dump command but I don't so I could use some help with that. I just practiced some SQL in the mean time because you had to teach web design.
Tuesday, November 12, 2013
Primary and Foreign Keys and Data Dump
I spent most of the day trying to figure out when to use primary and foreign keys and I sort of understand it and I figured out how to dump data. That's basically all I did because I'm a bit confused about primary keys but I almost have the entire fruit database done and I understand most of SQL.
Friday, November 8, 2013
More SQL Practice
I have been trying things stated in the manga like "WHERE" statements and it has helped quite a bit to understand the format of SQL. I'm almost done with the fruit tables made in the manga I just have to add the foreign keys and primary keys but I'm not too sure about those and I will try adding info. Should I try messing with scripts and making my own table with foreign keys next week or do you have something else in mind?
Thursday, November 7, 2013
SQL
I spent most of the day changing around the tables so that they are exactly like the ones in the manga but I wasted a lot of time with silly mistakes. I was able to finally get this chunk of code working which was kind of annoying.
sqlite> SELECT sales.report_code, dates, sales.export_destination_code, export_destination_name, sales_statement.product_code, product_name, unit_price
...> FROM sales, sales_statement, product, export_destination
...> WHERE sales.report_code = sales_statement.report_code
...> AND
...> sales_statement.product_code = product.product_code
...> AND
...> export_destination.export_destination_code = sales.export_destination_code;
1101|3/5|12|KINGDOM OF MINANMI|101|MELON|800
1101|3/5|12|KINGDOM OF MINANMI|102|STRAWBERRY|150
1102|3/7|23|ALPHA EMPIRE|103|APPLE|120
1103|3/8|25|THE KINGDOM OF RITOL|104|LEMON|200
1104|3/10|12|KINGDOM OF MINANMI|101|MELON|800
1105|3/12|25|THE KINGDOM OF RITOL|103|APPLE|120
1105|3/12|25|THE KINGDOM OF RITOL|104|LEMON|200
sqlite> SELECT sales.report_code, dates, sales.export_destination_code, export_destination_name, sales_statement.product_code, product_name, unit_price
...> FROM sales, sales_statement, product, export_destination
...> WHERE sales.report_code = sales_statement.report_code
...> AND
...> sales_statement.product_code = product.product_code
...> AND
...> export_destination.export_destination_code = sales.export_destination_code;
1101|3/5|12|KINGDOM OF MINANMI|101|MELON|800
1101|3/5|12|KINGDOM OF MINANMI|102|STRAWBERRY|150
1102|3/7|23|ALPHA EMPIRE|103|APPLE|120
1103|3/8|25|THE KINGDOM OF RITOL|104|LEMON|200
1104|3/10|12|KINGDOM OF MINANMI|101|MELON|800
1105|3/12|25|THE KINGDOM OF RITOL|103|APPLE|120
1105|3/12|25|THE KINGDOM OF RITOL|104|LEMON|200
Wednesday, November 6, 2013
SQL
I finished recreating all the tables that were mentioned in the manga and I think they are all functional. I practiced with some statements and they are actually kind of neat. I messed around with the product table a bit and selected different data by using restrictions like unit_price<800.
I also think it's worth mentioning that my sister is taking SQL classes and she needed help making a table so I became a bit more familiar with scripts and foreign/primary keys with the help of my brother.
I also think it's worth mentioning that my sister is taking SQL classes and she needed help making a table so I became a bit more familiar with scripts and foreign/primary keys with the help of my brother.
Monday, November 4, 2013
Getting Down With SQL
I looked over the Wikipedia page about Normalization and I think I understand it. I don't fully understand 1st, 2nd, and 3rd Normal Form because a lot of terms I do not know are used but I think I know enough to start working with SQL. I started by recreating the tables made in the Manga and I think I finally know how to operate the basics after coming across problems but fortunately you could answer them(like not using periods in my code). Tomorrow I will finish up the tables and try different operations like updating the data.
Friday, November 1, 2013
SQL Practice
I practiced SQL and it was really annoying at first but I think I am getting the hang of it. I started by making a table of presidents but I had trouble inserting values and I didn't quite understand the syntax so then I just made a random table with random values and got everything working. So it is possible to make data tables through vim or through SQL? I made mine using SQL, should I know how to do it through vim too?
This is what I did, unfortunately it took me a long time to figure out
sqlite> CREATE TABLE test(
...> stuff varchar,
...> garbage varchar,
...> random varchar);
sqlite> insert into test (stuff, garbage, random) values (blah, spam, woop)
...>
Error: no such column: blah
sqlite> INSERT INTO test(stuff, garbage, random) VALUES ("blah", "spam", "woop");
sqlite> select * from test;
blah|spam|woop
This is what I did, unfortunately it took me a long time to figure out
sqlite> CREATE TABLE test(
...> stuff varchar,
...> garbage varchar,
...> random varchar);
sqlite> insert into test (stuff, garbage, random) values (blah, spam, woop)
...>
Error: no such column: blah
sqlite> INSERT INTO test(stuff, garbage, random) VALUES ("blah", "spam", "woop");
sqlite> select * from test;
blah|spam|woop
Thursday, October 31, 2013
SQL
I finished reading the book and it mainly talked about how SQL can be applied to the real world and how SQL works on a website and computer. I understood most of the book but there are a couple of concepts I don't get but after messing around with SQL a bit I think I will understand it more.
Wednesday, October 30, 2013
Chapter 5
Chapter 5 deals with user restrictions and security and it was all pretty straightforward
- It's possible to require user name and passwords to operate a database and accounts can be restricted to certain actions such as allowing someone to update but not insert
- A database can also prevent two or more people from entering data at the same time by setting up a queue
- Locks can also be put on data to prevent it from being messed with but all actions can be reverted before being applied
- If there is a lot of data an index can be used to search faster but an index should not be too big otherwise it ends up taking a long time to maintain
- Logs are also recorded that allow the database to be restored to a different status
Tuesday, October 29, 2013
SQL Guide Chapter 4
Chapter 4 deals with SQL Commands like
- Search Statements:
- Wild Cards allow a user to search for data that starts or end with a certain character (%n or _t)
- Comparisons like less than or equal to (x>=y, x=y, x<>y means not equal to)
- Input and Retrieve Data:
- "Insert" obviously inserts data
- "Select" chooses a column
- "Where" can be used to specify certain data (WHERE x=y)
- "From" can be used to specify a table
- "And", "Or", "Between", and "Not" can be used to make more complex statements with more restrictions
Monday, October 28, 2013
Manga Guide
I continued reading The Manga Guide to SQL and after finishing Chapter 3 I learned that
- Data tables should be divided whenever more than one value is taking up a row or column
- Tables should be divided if there is a lack of data
- Different relationships and how to analyze data, such as many to many or one to many
Thursday, October 24, 2013
Links
I added a hover color to my links and padding that I like. I was going to add a border but I didn't like the look of it because of how little I have on my web page.
Wednesday, October 23, 2013
Google Fonts
I started lesson 3 of "Getting Down with CSS" and I looked at adding colors while hovering over links but I was really interested in Google text effects although because it is in beta I think it may be preventing my page from validating so I will be removing the animated flames.
Tuesday, October 22, 2013
Fonts
I spent the majority of this day looking at Google fonts and I had trouble with it so it took me awhile to get it working due to my misunderstanding of how external style sheets work, but I finally set the font "Press Start 2P" to work as my title. I also looked a little bit at favicons and Google's text effects.
Monday, October 21, 2013
Refining the Home Page
For the first part of today I worked on changing the colors of my web page to look a little better and I may be changing it depending on what I add because there is currently very little on my web page.
This is what I am basing the color scheme off of:
http://colorschemedesigner.com/#2Q12AdUGWZpVa
I also started lesson 2 and tried to import a Google font but I was having trouble with it so I will give it another try later.
This is what I am basing the color scheme off of:
http://colorschemedesigner.com/#2Q12AdUGWZpVa
I also started lesson 2 and tried to import a Google font but I was having trouble with it so I will give it another try later.
Tuesday, October 15, 2013
Getting down with weekly journals
In September I was working on html and I am currently done with that. Right now I am working on SQL and I have been learning from Chris and whenever he is not around I mainly read the manga. Our goal after learning how to work with SQL is to make a database called "check it out". I couldn't do much with what I know right now but I understand some of the format and how some things work.
Subscribe to:
Posts (Atom)