Six weeks of internship has past by at the speed of light. I am very thankful Wasserman + Partners Advertising has given me this opportunity. I’ve learned a lot over the past 6 weeks. Not only in the technical area (Symfony, Facebook API, Subversion, WordPress, etc.) but also the workings of an advertising agency.
The Interactive Design program from Capilano University has taught me a broad range of skills. Even though I was a Web Developer Intern, when the opportunities came, I was able to help out in the other areas (e.g., IA, Adobe Photoshop, etc.). Sure, I was asked to do something I didn’t know or taught. No school teaches everything you need in the real world. Sometime you have the luxury to ask your colleagues and or friends but sometime you do not. It is best to just accept the challenges and dive into the deep end of the unknown and learn on your own. Information / knowledge is readily available at your fingertips. You just have to google it.
Work programs like internship provides students the opportunity to see if what they imagine about a job is really what they expect / like. Internship also provides great opportunity for potential employers to find up-coming talents. I only wish Interactive Design at Capilano University offers a Co-Op program instead of an Internship. Co-Op provides multiple work terms and each work term is at least 4 months long. You get the opportunity to try out different type of jobs. I really enjoyed it when I was studying my Computer Science degree at Simon Fraser University.
Monday, April 18, 2011
Sunday, April 17, 2011
Internship — Week 6
For my last week of internship (6th week), I got to do the followings:
Symfony: Getting the hang of generating data model, forms, filters, and modules in Symfony. Here are the general steps I have developed:
Subversion: If Subversion is configured to use HTTP, it is still possible to restrict access by user/password login. The following discussion is based off Apache web server.
As part of Apache configuration for Subversion you can direct Apache to a specific user/password file. Typically this file ends with .passwd. But storing user/password in plain text is pointless. No need to worry. There is a command you can use to create user and encrypted password entries in this file. Though you need to have root / administrative access to the server.
Here is the command:
$ sudo htpasswd -mb <userPasswordFile> <user> <password>
Where
How does this encrypts the password? It's done by the option -m (MD5 encryption method). If you would like to use another encryption method, change -m to the corresponding option (-d: CRYPT and -s: SHA).
Option -b tells the system to use the password specified in the command line. Otherwise, you will be prompted to enter the password.
To delete a user from the file, execute the following command:
$ sudo htpasswd -D <userPasswordFile> <user>
- Learned more about Symfony
- Built more things with Symfony
- Learned more about Subversion (User Administration)
- Setup staging / testing environment for up-coming campion website
- More game playing (I mean testing)
- Slicing up mockups done in Adobe Photoshop into web images
Symfony: Getting the hang of generating data model, forms, filters, and modules in Symfony. Here are the general steps I have developed:
- Define tables in database
- Reverse engineer database table definitions to /config/schema.yml
$ php symfony propel:build-schema - Generate the necessary models
$ php symfony propel:build --model
Note: If you do not want to regenerate all the models of all the tables in the database, make sure you trim /config/schema.yml. Though, don't forget to save a copy of it before trimming it and restoring it after these steps. - Generate the necessary filters
$ php symfony propel:build --filters - Generate the necessary forms
$ php symfony propel:build --forms - Generate the necessary modules
$ php symfony propel:generate-module \
--non-verbose-templates --with-show \
<appName> <moduleName> <modelName>
Where
<appName> = the name of the application<moduleName> = the name of module for the application<modelName> = the name of the model for the moduleNote: If you don't know already, the black slash ("\") indicates the command continues on the next line (UNIX / Linux).
Repeat this until all modules are generated. - If administrative modules (pages) are required, generate them by
$ php symfony propel:generate-admin \
--module=<adminModuleName> <appAdminName> <modelName>
Where
<adminModuleName> = the name of the administrative module for the application (to make things easier, use the same name as the non-administrative module if they are related)<appAdminName> = the name of the application for administrative purposes (assuming this is related to the non-administrative application, then just suffix that name with "admin" or "_admin")<modelName> = the name of the model for the administrative moduleRepeat this until all administrative modules are generated.
Subversion: If Subversion is configured to use HTTP, it is still possible to restrict access by user/password login. The following discussion is based off Apache web server.
As part of Apache configuration for Subversion you can direct Apache to a specific user/password file. Typically this file ends with .passwd. But storing user/password in plain text is pointless. No need to worry. There is a command you can use to create user and encrypted password entries in this file. Though you need to have root / administrative access to the server.
Here is the command:
$ sudo htpasswd -mb <userPasswordFile> <user> <password>
Where
<userPasswordFile> = fully qualified (full path) name of the user/password file configured in Apache for Subversion.
<user> = user id to be used for login
<password> = plain text format of the password
How does this encrypts the password? It's done by the option -m (MD5 encryption method). If you would like to use another encryption method, change -m to the corresponding option (-d: CRYPT and -s: SHA).
Option -b tells the system to use the password specified in the command line. Otherwise, you will be prompted to enter the password.
To delete a user from the file, execute the following command:
$ sudo htpasswd -D <userPasswordFile> <user>
Sunday, April 10, 2011
Internship — Week 5
My week 5 internship ended well (got the hang of things with Symfony and Subversion and overall it was a productive week). I got to do the followings:
Symfony: Symfony documentation talks about defining database schema using YAML. Symfony uses the YAML definition (stored in /config/schema.yml) to generate data models, filter, forms, and modules. If you don't want to learn 'Yet Another Markup Language', you can define the database schema using the database of choice and then use Symfony reverse engineer the database into YAML. Though, I found a problem with this process (Symfony with Propel). ENUM data type was lost. Meaning, it does not generate the enumerated values defined in the database and it translated ENUM to CHAR.
$ php lib/vendor/symfony/data/bin/symfony propel:build-schema
The above command will reverse engineer all tables in the database.
Subversion: Apparently Subversion embeds the repository's URL in a file called entries (inside a hidden folder called .svn). If the repository has to be rebuilt from production source code (.svn folders must be in production as well) for whatever reason, it could difficult under the following conditions:
The process I used to rebuild the repository was as follow:
NetBeans: NetBeans IDE is not bad. Downloading the package was a lot less complicated than Eclipse (didn't have to deal with different package versions (for Java, PHP, JavaScript, etc.)). Setting up the project was a bit confusing for a new user. Subversion integration is good (though the setup isn't as straight forward). Contextual menu made it easy to check for changes or committing changes. The comparison functionality is user friendly.
- Learned more about Symfony
- Built something using Symfony
- Learned more about Subversion
- Reconstructed / rebuilt a Subversion Repository
- Played (I mean tested) some games
- Data extraction
Symfony: Symfony documentation talks about defining database schema using YAML. Symfony uses the YAML definition (stored in /config/schema.yml) to generate data models, filter, forms, and modules. If you don't want to learn 'Yet Another Markup Language', you can define the database schema using the database of choice and then use Symfony reverse engineer the database into YAML. Though, I found a problem with this process (Symfony with Propel). ENUM data type was lost. Meaning, it does not generate the enumerated values defined in the database and it translated ENUM to CHAR.
$ php lib/vendor/symfony/data/bin/symfony propel:build-schema
The above command will reverse engineer all tables in the database.
Subversion: Apparently Subversion embeds the repository's URL in a file called entries (inside a hidden folder called .svn). If the repository has to be rebuilt from production source code (.svn folders must be in production as well) for whatever reason, it could difficult under the following conditions:
- Production source code was copied from Working Copy that was checked out with URL of localhost
- No access to original Working Copy's computer
The process I used to rebuild the repository was as follow:
- Copy production source code to a local computer (because Subversion information is in the production source code, this copy becomes a Working Copy
- Because Subversion information on the repository is based off localhost, I need to trick my local computer to think localhost as the Subversion repository on the server
- To do this, modify the local computer's hosts file
- comment out: 127.0.0.1 localhost
- add: 999.999.999.999 localhost
- Using an Subversion client (I used NetBeans IDE (Integrated Development Environment)) push the production source code to the repository (use the Update command) — may have to Merge changes (always accept local changes)
NetBeans: NetBeans IDE is not bad. Downloading the package was a lot less complicated than Eclipse (didn't have to deal with different package versions (for Java, PHP, JavaScript, etc.)). Setting up the project was a bit confusing for a new user. Subversion integration is good (though the setup isn't as straight forward). Contextual menu made it easy to check for changes or committing changes. The comparison functionality is user friendly.
Sunday, April 3, 2011
Internship — Week 4
My week 4 internship was fun, nerve-racking, and satisfying. I got to do the followings:
Symfony: Symfony provides a way for an application to sets its global configuration / settings. They are like global variables. All you need to do is enter them in app.yml and save this file in apps/AppName/config/.
As much as I appreciate what Symfony offers, I really question the value of it on websites with 85% to 90% static pages and less than or equal to 5 database tables. Website that uses the database tables for simple data storage not transactional like e-commerce.
One of the argument I have been given (and read online) is that the framework will prevent SQL injection. As it so happened this past week, we all heard / saw one of the largest SQL injection attack. So, does a framework like Symfony can prevent this kind of attack? Is it worth the extra complexity in development? Is it not enough to use mysql_real_escape_string function (in PHP) or equivalent?
Another argument I have read is because it is Object-Oriented (OO). I think this is similar to Beta versus VHS or Blue-Ray vs High-Definition DVD. In my opinion, Object-Oriented programming / development Does Not make applications better. Nor does Structured Programming / development. I truly believe skilled designers and developers, experience, and proper testing make good applications. OO, Structured Programming, Symfony, etc. are just methodologies / tools.
If you have an opinion on this, please comment on this blog entry.
Subversion: is an open source version control system. By the way, did you know it comes installed on Mac OS X? A version control system comes in handy when multiple people are working on the same set of files / documents. It provides a check-in / check-out service, versioning (maintaining all versions of the same file), comparison of different versions, merging of different version, etc.
So far, I haven't found a good open source GUI (Graphical User Interface) client for Mac OS X or Ubuntu Linux or web based. Yes, I'm not much of a command prompt person. Why memorize commands when you can do things via nice GUI.
If you know of a nice GUI client (anything but Microsoft Windows) that does everything (i.e., create a repository (one that can be access via http or https with user authentication), import the original set of files, maintain different environments (i.e., development, testing, production), maintain product releases (i.e., release 1, release 2, etc.), etc.), please let me know via comment of this blog entry.
Fun and Game: Playing games as a job was fun and attention getter. Before I was able to play, I had to figure out how to make a Hori Real Arcade Pro V3 SA game controller manipulate the mouse and or the keyboard in a Microsoft Windows 7 touch-screen PC. This particular game controller was made specifically for Sony PS3 and does not come with drivers or documentation. After Googling forum after forum and trying a few emulation software, Success.
It turns out the game controller's Stick Control Toggle switch was the magic switch. By switching it to the middle, the emulation software was able to detect the stick movements and map them to move the mouse and or press keys.
Game Time: 2 of the 3 prototype games were harder than expected (this was not just my opinion). For the final product, these games will be dialed back to make it a bit easier as they are meant to be played within 1 minute each.
Next week, I will configure another touch-screen PC with a second Hori Real Arcade Pro V3 SA game controller. More play time. :-)
Challenge: Being the only web developer on staff is challenging. Asking a couple external resources for advice was a lot harder than I thought. They explained the options but they never provide a solid direction. They all say, "It's up to you. Do what you are comfortable with." Well, being new in the field (hence, interning) comments like these are definitely not helpful. I thought experienced professionals would be more forthcoming with their wisdoms / guidance.
I have come to realize part way through this week I will have to make my own decisions on how things will be done. I just have to rely on my gut-instincts, my past experience, and what I've learned in school.
- Learned more about Symfony
- Learned more about Facebook's Social Plug-ins, Dialogs, FQL (Facebook Query Language), and JavaScript SDK
- Participated in discussions on an up-coming web/Facebook game and contest web/Facebook app
- Learned about Subversion
- Mapped a Hori Real Arcade Pro V3 SA game controller to control the mouse and keyboard in a Microsoft Windows 7 touch-screen computer
- Learned about DNS (Domain Name System) / NS (Name Server Record) Maintenance
- Launched Granville Island Brewing's new website
Symfony: Symfony provides a way for an application to sets its global configuration / settings. They are like global variables. All you need to do is enter them in app.yml and save this file in apps/AppName/config/.
As much as I appreciate what Symfony offers, I really question the value of it on websites with 85% to 90% static pages and less than or equal to 5 database tables. Website that uses the database tables for simple data storage not transactional like e-commerce.
One of the argument I have been given (and read online) is that the framework will prevent SQL injection. As it so happened this past week, we all heard / saw one of the largest SQL injection attack. So, does a framework like Symfony can prevent this kind of attack? Is it worth the extra complexity in development? Is it not enough to use mysql_real_escape_string function (in PHP) or equivalent?
Another argument I have read is because it is Object-Oriented (OO). I think this is similar to Beta versus VHS or Blue-Ray vs High-Definition DVD. In my opinion, Object-Oriented programming / development Does Not make applications better. Nor does Structured Programming / development. I truly believe skilled designers and developers, experience, and proper testing make good applications. OO, Structured Programming, Symfony, etc. are just methodologies / tools.
If you have an opinion on this, please comment on this blog entry.
Subversion: is an open source version control system. By the way, did you know it comes installed on Mac OS X? A version control system comes in handy when multiple people are working on the same set of files / documents. It provides a check-in / check-out service, versioning (maintaining all versions of the same file), comparison of different versions, merging of different version, etc.
So far, I haven't found a good open source GUI (Graphical User Interface) client for Mac OS X or Ubuntu Linux or web based. Yes, I'm not much of a command prompt person. Why memorize commands when you can do things via nice GUI.
If you know of a nice GUI client (anything but Microsoft Windows) that does everything (i.e., create a repository (one that can be access via http or https with user authentication), import the original set of files, maintain different environments (i.e., development, testing, production), maintain product releases (i.e., release 1, release 2, etc.), etc.), please let me know via comment of this blog entry.
Fun and Game: Playing games as a job was fun and attention getter. Before I was able to play, I had to figure out how to make a Hori Real Arcade Pro V3 SA game controller manipulate the mouse and or the keyboard in a Microsoft Windows 7 touch-screen PC. This particular game controller was made specifically for Sony PS3 and does not come with drivers or documentation. After Googling forum after forum and trying a few emulation software, Success.
It turns out the game controller's Stick Control Toggle switch was the magic switch. By switching it to the middle, the emulation software was able to detect the stick movements and map them to move the mouse and or press keys.
Game Time: 2 of the 3 prototype games were harder than expected (this was not just my opinion). For the final product, these games will be dialed back to make it a bit easier as they are meant to be played within 1 minute each.
Next week, I will configure another touch-screen PC with a second Hori Real Arcade Pro V3 SA game controller. More play time. :-)
Challenge: Being the only web developer on staff is challenging. Asking a couple external resources for advice was a lot harder than I thought. They explained the options but they never provide a solid direction. They all say, "It's up to you. Do what you are comfortable with." Well, being new in the field (hence, interning) comments like these are definitely not helpful. I thought experienced professionals would be more forthcoming with their wisdoms / guidance.
I have come to realize part way through this week I will have to make my own decisions on how things will be done. I just have to rely on my gut-instincts, my past experience, and what I've learned in school.