Thursday: 12:55-2:30
Friday: 12:55-2:30
This week ended with more app work. After finally cracking the code of the athletic calendar scraping, the rest of the backend was not hard to write. I just had to get uploading to the database working correctly, and the Python for that part of the app was done. Then, I started on the HTML. This was also an interesting task. Since the calendar would be viewed on a phone, it would have to be legible on that small of a screen. So, the issue was which format I would display the calendar in. I could display the whole month, which would be easier to code since the data I scrape so far is for the current month only, or a week view, which would be easier to read, but more difficult to code. Instead of deciding this to begin with, I decided to take the code I had put in AppFurnace before the big switch to PhoneGap and transport it, since it's JavaScript, into our new code. So, I spent the rest of the week editing that code to make it compile in ordinary JavaScript. Then, with nothing more to do without making the view decision, I had to make a choice. I ended up deciding on a month view that would create buttons in all of the days that had events in them. These buttons would then lead to a day view that would show all of the events in that particular day.
I'm very proud of the work I've accomplished this week. It has taken a lot of time, but I finally found a way through the problem I've been having the last few weeks. Finally being able to figure this hardship out mostly on my own has given me an ego boost that will help me through the rest of this project. Additionally, in future projects, this achievement will help me persevere through similar trials.
This blog keeps track of my experiences as a technology intern at Cedar Crest High School.
Search This Blog
Monday, March 30, 2015
Saturday, March 21, 2015
March 16-18
Monday: 12:55-2:30
Tuesday: 12:55-2:30
Wednesday: 12:25-2:30
The beginning of this week was exciting in many ways. To begin with, I was given the opportunity to meet the Governor of Pennsylvania. He had come to visit one of our district's elementary schools to rally support for additional funding for schools. I got to follow his tour through the school, shake his hand, and even have a conversation with him about what I do with regards to technology in the high school and the rest of the district.
After the Governor had given an interview with our local news station and left the building, I sat down with my mentor to work on the issue of the athletic calendar. As I described the problems I had been facing in the previous week, he and I looked at the site that houses the calendar. I explained the problem with using the URL that Chrome's Developer Tools had led me to and my mentor simply pressed a different button than I had and it worked. This was, of course, a little frazzling because of the amount of time I had spent scouring the internet for answers when my original idea would have worked, but it was also very exciting. The problem had been that the URL given in Developer Tools had an extra path at the end of it that was unnecessary and would not lead me to the actual site. By opening the URL in a new window, the correct URL was used and could be collected. So, now my job should be a lot simpler than it was going to be.
On Wednesday, I began to implement the solution that we had discovered the day before. I scraped the URL we had found pretty simply, and then just had to find a way to properly parse the information I had found. This would not have been too difficult if I had been familiar with Python, the language we're using to work with scraping and the database. However, after a brief conversation with Google, I found the correct syntax for what I was trying to do. By the end of the day, I had information uploading to the database. The only problem was that not all of the information I wanted was being uploaded. It turns out that for some reason, not all of the tags that I was searching for were being recognized. I found that part of the problem was that some of the words I was searching for were used in multiple pieces of information. For example, one thing I wanted to upload was the "FACILITY". However, there are also sections for "FACILITY_ID", "FACILITY_CITY" etc. So, I just checked to make sure that each section included "FACILITY", but not a hyphen and that worked well. The other problem is yet to be solved. Some of the tags have no reason to not be recognized. The one that I noticed first was "SPORT". There are other sections that include "SPORT", like "TRANSPORT" and "SPORT_ID", but when I printed out every section that got through the if statement ensuring that the section included "SPORT", none of the ones that I actually wanted made it through. So, apparently "SPORT" does not include "SPORT" in it.
Tuesday: 12:55-2:30
Wednesday: 12:25-2:30
The beginning of this week was exciting in many ways. To begin with, I was given the opportunity to meet the Governor of Pennsylvania. He had come to visit one of our district's elementary schools to rally support for additional funding for schools. I got to follow his tour through the school, shake his hand, and even have a conversation with him about what I do with regards to technology in the high school and the rest of the district.
After the Governor had given an interview with our local news station and left the building, I sat down with my mentor to work on the issue of the athletic calendar. As I described the problems I had been facing in the previous week, he and I looked at the site that houses the calendar. I explained the problem with using the URL that Chrome's Developer Tools had led me to and my mentor simply pressed a different button than I had and it worked. This was, of course, a little frazzling because of the amount of time I had spent scouring the internet for answers when my original idea would have worked, but it was also very exciting. The problem had been that the URL given in Developer Tools had an extra path at the end of it that was unnecessary and would not lead me to the actual site. By opening the URL in a new window, the correct URL was used and could be collected. So, now my job should be a lot simpler than it was going to be.
On Wednesday, I began to implement the solution that we had discovered the day before. I scraped the URL we had found pretty simply, and then just had to find a way to properly parse the information I had found. This would not have been too difficult if I had been familiar with Python, the language we're using to work with scraping and the database. However, after a brief conversation with Google, I found the correct syntax for what I was trying to do. By the end of the day, I had information uploading to the database. The only problem was that not all of the information I wanted was being uploaded. It turns out that for some reason, not all of the tags that I was searching for were being recognized. I found that part of the problem was that some of the words I was searching for were used in multiple pieces of information. For example, one thing I wanted to upload was the "FACILITY". However, there are also sections for "FACILITY_ID", "FACILITY_CITY" etc. So, I just checked to make sure that each section included "FACILITY", but not a hyphen and that worked well. The other problem is yet to be solved. Some of the tags have no reason to not be recognized. The one that I noticed first was "SPORT". There are other sections that include "SPORT", like "TRANSPORT" and "SPORT_ID", but when I printed out every section that got through the if statement ensuring that the section included "SPORT", none of the ones that I actually wanted made it through. So, apparently "SPORT" does not include "SPORT" in it.
Friday, March 20, 2015
March 12-13
Thursday: 12:55-2:30
Friday: 12:55-2:30
Towards the end of the week, I decided to put the scraping problem aside for a day so that I don't get so frustrated that I don't want to continue. Instead, my colleague and I started planning for a fundraiser we would have on Friday night. We will be hosting another video game tournament during a fair-like event that another club at our school is throwing. So, we had to organize who would be bringing the gaming systems, where we would get the TV's, where we would be holding the tournament, prices, prizes, and who would be able to work the event. On Friday, then, I continued to search for a solution to the elusive problem of scraping the athletic schedule. My colleague finished the drop down menu that will allow students to search for a room name by the last name of the teacher that occupies it.
This week was a little painful because of all of the times that I had to start over and all of the problems that I encountered before I realized I would have to start over. However, I knew that this was coming when I started this project. Just by looking through the code for the site that houses the athletic schedule when we were planning the app, I knew that it would not be fun to scrape. Yet, it is still aggravating to have to go through all of this trouble. I guess it is good practice for the real world, though.
Friday: 12:55-2:30
Towards the end of the week, I decided to put the scraping problem aside for a day so that I don't get so frustrated that I don't want to continue. Instead, my colleague and I started planning for a fundraiser we would have on Friday night. We will be hosting another video game tournament during a fair-like event that another club at our school is throwing. So, we had to organize who would be bringing the gaming systems, where we would get the TV's, where we would be holding the tournament, prices, prizes, and who would be able to work the event. On Friday, then, I continued to search for a solution to the elusive problem of scraping the athletic schedule. My colleague finished the drop down menu that will allow students to search for a room name by the last name of the teacher that occupies it.
This week was a little painful because of all of the times that I had to start over and all of the problems that I encountered before I realized I would have to start over. However, I knew that this was coming when I started this project. Just by looking through the code for the site that houses the athletic schedule when we were planning the app, I knew that it would not be fun to scrape. Yet, it is still aggravating to have to go through all of this trouble. I guess it is good practice for the real world, though.
March 9-11
Monday: 12:55-2:30
Tuesday: 12:55-2:30
Wednesday: 12:25-2:30
Now, for this week, I'm still looking at different ways to scrape the athletic calendar. So, I found yet another package that might do the trick. I installed that and started working on the syntax of actually coding my solution to load the website and then scrape the code of the loaded page. I spent the entirety of Monday, Tuesday, and Wednesday finding new modules, trying to install them, testing them, and scrapping them. It is getting increasingly frustrating to have to go back to the drawing board after every failed attempt and having to troubleshoot only to find that the module I've found doesn't work. As a small side-project during the week, my mentor and I worked on fixing the software that monitors our students' computers during class. The software is supposed to be able to give demos that show on every computer in the room, but they have not been working. So, when I was taking a break from the frustration of the cycle of searching and scrapping, I was working on making that software work properly and finding the error it was having.
Tuesday: 12:55-2:30
Wednesday: 12:25-2:30
Now, for this week, I'm still looking at different ways to scrape the athletic calendar. So, I found yet another package that might do the trick. I installed that and started working on the syntax of actually coding my solution to load the website and then scrape the code of the loaded page. I spent the entirety of Monday, Tuesday, and Wednesday finding new modules, trying to install them, testing them, and scrapping them. It is getting increasingly frustrating to have to go back to the drawing board after every failed attempt and having to troubleshoot only to find that the module I've found doesn't work. As a small side-project during the week, my mentor and I worked on fixing the software that monitors our students' computers during class. The software is supposed to be able to give demos that show on every computer in the room, but they have not been working. So, when I was taking a break from the frustration of the cycle of searching and scrapping, I was working on making that software work properly and finding the error it was having.
Wednesday, March 11, 2015
March 2-6
Monday: 1:25-2:30
Tuesday: 12:00-1:00
Friday: 1:25-2:30
This week was very split up because we had two two hour delays, two snow days, and an early dismissal. So, on Monday, I finished entering all of the teachers and their room numbers into the database so they could be used in the app mapping area. Additionally, we worked on the path-finding algorithm to navigate the hallways of the school. We had to first decide which way we wanted to go about winding the path. We decided that we would start in the hallway that the start room is contained in. Then, from that hallway, we would find the hallway that is closest to the target and is perpendicular to the current hallway, because the layout of our school facilitates this method. It would continue moving through perpendicular hallways until it reaches the target hallway. After the method of path-finding was decided, my colleague began coding that while I started to tackle the beast of data scraping: the athletic calendar. When we first started to look into scraping, I found an issue with the site our school uses to host our athletic calendars. The calendar is not hard-coded into the source code, it is input with a javascript. This makes scraping much more difficult because now we have to find a way to collect the data without having direct access to it. My first idea is to see if I can trace the origin of the data with Google's Developer tools. If I can, I'll just be able to manipulate the site URL based on the date and get the data from there. However, after a bit of searching, I found that these origins are not reliable and will not work for my purposes.
Later, I found a module called Spynner that can load webpages within Python. I worked on downloading and installing the module into Python for part of the period, but then took some time to help with the mapping rocess. On the path-finding side of the app, my colleague was having some logic errors. Currently, the algorithm will find a path to the target room, but it is not the most efficient and sometimes isn't even sensible. So, we had to make the map more accurate regarding a small hallway that is almost connected to a larger hallway. Before, we had had the smaller hallway connected, but this ended in incorrect paths because not ever path required going to the end of both the smaller and larger hallways. So, we had to change it.
On Friday, I was still troubleshooting the installation of Spynner. So, after downloading and installing it, I tried to work out how to use Spynner to run the javascript on our athletic calendar's site. However, it turns out that Spynner is not capable of running javascript. Instead, it can manipulate inputs on a webpage. So, I was back to the drawing board. After the frustration of another dead-end, I helped to test the working path-finding program. Then, my coleague decided to start on a drop-down menu to list the possible rooms to start and end in, and I continued my quest of scraping the dreaded athletic calendar.
Tuesday: 12:00-1:00
Friday: 1:25-2:30
This week was very split up because we had two two hour delays, two snow days, and an early dismissal. So, on Monday, I finished entering all of the teachers and their room numbers into the database so they could be used in the app mapping area. Additionally, we worked on the path-finding algorithm to navigate the hallways of the school. We had to first decide which way we wanted to go about winding the path. We decided that we would start in the hallway that the start room is contained in. Then, from that hallway, we would find the hallway that is closest to the target and is perpendicular to the current hallway, because the layout of our school facilitates this method. It would continue moving through perpendicular hallways until it reaches the target hallway. After the method of path-finding was decided, my colleague began coding that while I started to tackle the beast of data scraping: the athletic calendar. When we first started to look into scraping, I found an issue with the site our school uses to host our athletic calendars. The calendar is not hard-coded into the source code, it is input with a javascript. This makes scraping much more difficult because now we have to find a way to collect the data without having direct access to it. My first idea is to see if I can trace the origin of the data with Google's Developer tools. If I can, I'll just be able to manipulate the site URL based on the date and get the data from there. However, after a bit of searching, I found that these origins are not reliable and will not work for my purposes.
Later, I found a module called Spynner that can load webpages within Python. I worked on downloading and installing the module into Python for part of the period, but then took some time to help with the mapping rocess. On the path-finding side of the app, my colleague was having some logic errors. Currently, the algorithm will find a path to the target room, but it is not the most efficient and sometimes isn't even sensible. So, we had to make the map more accurate regarding a small hallway that is almost connected to a larger hallway. Before, we had had the smaller hallway connected, but this ended in incorrect paths because not ever path required going to the end of both the smaller and larger hallways. So, we had to change it.
On Friday, I was still troubleshooting the installation of Spynner. So, after downloading and installing it, I tried to work out how to use Spynner to run the javascript on our athletic calendar's site. However, it turns out that Spynner is not capable of running javascript. Instead, it can manipulate inputs on a webpage. So, I was back to the drawing board. After the frustration of another dead-end, I helped to test the working path-finding program. Then, my coleague decided to start on a drop-down menu to list the possible rooms to start and end in, and I continued my quest of scraping the dreaded athletic calendar.
Sunday, March 8, 2015
February 26-27
Thursday: 12:55-2:30
Friday: 12:55-2:30
During the end of the week, I finished connecting the html of the clubs page to the database, and got the table of clubs formatted. I ran into some issues on Thursday where no data would print from the database, but there were also no alerts as to why the code wasn't working. Even the alerts that I coded in weren't showing up. Eventually, though, my colleague figured out that nothing was printing because the program was trying to execute the code to print the table before the code that gathered the table from the database was finished running. So, I put the formatting code in a function and called that function at the end of the data-gathering code. By Friday, I had finished this code, though it still needs to be tested on a phone to see if the format is accurate. So, now the only thing left to do for the clubs page is find a way to parse the table that we scraped from the high school site into the different kinds of data they represent.
My colleague and I also decided that we should have a section of the app that helps new students and parents navigate the school. In order to do this, we thought we could create a part of the app that would give people directions from one part of the school to another based on room number. We also plan to create a section that will allow students to enter a teacher's name and find out their room number. So, on Thursday, we started brainstorming the most effective way of implementing this idea. First, we had to decide how we would think of the map of the school on a code level. We created a couple of options: a grid of the school with a classroom, hallway, or intersection in each block, a network of hallways which would store the classrooms in that hallway and the hallways it intersected, or an array of classrooms that would each hold the hallway or hallways they were on. We started with the grid idea on Thursday, but by Friday, we had decided that the most efficient way to do what we wanted was to use the hallway setup. So, we had the hallways of the school being drawn to scale by the end of Friday. After that, my colleague started to assign room numbers to hallways and I started to fill a section of our database with the name and room number of all the teachers in the high school.
I really think that the mapping system we are starting with the app will be a very useful and exciting tool available to new students. During the first week of school, new students are always wandering the halls with their heads bent over maps, trying to understand where they are supposed to go. With an interactive set of directions, new students will be able to find their way more easily and the situation of other students giving new students the wrong directions will be almost completely solved. Furthermore, if someone needs to get to the room of a teacher they've never had before, they will be able to find that teacher's room number and find where they need to go to get to that room.
Friday: 12:55-2:30
During the end of the week, I finished connecting the html of the clubs page to the database, and got the table of clubs formatted. I ran into some issues on Thursday where no data would print from the database, but there were also no alerts as to why the code wasn't working. Even the alerts that I coded in weren't showing up. Eventually, though, my colleague figured out that nothing was printing because the program was trying to execute the code to print the table before the code that gathered the table from the database was finished running. So, I put the formatting code in a function and called that function at the end of the data-gathering code. By Friday, I had finished this code, though it still needs to be tested on a phone to see if the format is accurate. So, now the only thing left to do for the clubs page is find a way to parse the table that we scraped from the high school site into the different kinds of data they represent.
My colleague and I also decided that we should have a section of the app that helps new students and parents navigate the school. In order to do this, we thought we could create a part of the app that would give people directions from one part of the school to another based on room number. We also plan to create a section that will allow students to enter a teacher's name and find out their room number. So, on Thursday, we started brainstorming the most effective way of implementing this idea. First, we had to decide how we would think of the map of the school on a code level. We created a couple of options: a grid of the school with a classroom, hallway, or intersection in each block, a network of hallways which would store the classrooms in that hallway and the hallways it intersected, or an array of classrooms that would each hold the hallway or hallways they were on. We started with the grid idea on Thursday, but by Friday, we had decided that the most efficient way to do what we wanted was to use the hallway setup. So, we had the hallways of the school being drawn to scale by the end of Friday. After that, my colleague started to assign room numbers to hallways and I started to fill a section of our database with the name and room number of all the teachers in the high school.
I really think that the mapping system we are starting with the app will be a very useful and exciting tool available to new students. During the first week of school, new students are always wandering the halls with their heads bent over maps, trying to understand where they are supposed to go. With an interactive set of directions, new students will be able to find their way more easily and the situation of other students giving new students the wrong directions will be almost completely solved. Furthermore, if someone needs to get to the room of a teacher they've never had before, they will be able to find that teacher's room number and find where they need to go to get to that room.
February 23-25
Monday: 12:55-2:30
Wednesday: 12:25-2:30
This week, I started working on displaying and formatting the table of sample data about the school clubs. We had an early dismissal on Tuesday, so I was unable to work on the app then, but on Monday I worked through changing the database code from the newspaper code to work with the club data as well. I also started to look into writing the code to display the take if clubs. On Wednesday, I got to experiment more with networking. My mentor brought a router down and I got to explore all of the different settings and functions that a router has. I also had a long conversation about the possibilities one has to pose a security threat with just a few simple pieces of software and a few different ways to combat such threats. Overall, it was very educational and interesting to get to broaden my understanding of how modern technology works.
Wednesday: 12:25-2:30
This week, I started working on displaying and formatting the table of sample data about the school clubs. We had an early dismissal on Tuesday, so I was unable to work on the app then, but on Monday I worked through changing the database code from the newspaper code to work with the club data as well. I also started to look into writing the code to display the take if clubs. On Wednesday, I got to experiment more with networking. My mentor brought a router down and I got to explore all of the different settings and functions that a router has. I also had a long conversation about the possibilities one has to pose a security threat with just a few simple pieces of software and a few different ways to combat such threats. Overall, it was very educational and interesting to get to broaden my understanding of how modern technology works.
Subscribe to:
Posts (Atom)
