Tag Archives: PHP

The Internet is like onions. Onions have layers.

Learning PHP felt a lot like JavaScript. At points, I got the two programming languages mixed up because of the use of the $ to define variables in PHP and its use in jQuery. I think I’m definitely getting a better feel for it because when I’d slip up on jQuery/JavaScript, I’d be stuck for hours. When I messed up on PHP, most times I knew exactly what I was looking for to fix my mistakes. It also helped that the PHP website tells you which line the error is on.

The PHP lesson also made me notice a concept that I had previously glazed over, thinking I understood. While we used jQuery primarily for interactive purposes and to give us actions with visible results for everything, the PHP lessons in the beginning primarily focused on using data and selecting things out of arrays. On this lesson, the author says we will focus on it as a programming language and not web development. Previously, I didn’t realize there was a difference. I recalled the Codecademy lesson on functions in JavaScript , in which we programmed these functions, but they did not visibly add anything to the structure of a website.

My initial thought after learning more about WordPress was that I need to take it off my resume. What I know about managing WordPress is comparable to taking a French class and trying to speak Haitian Creole. I knew WordPress as the site that hosted my e-portfolio, blogs I once had, and a niche site that I created about the Harlem Renaissance for a project once. I know how to upload content into WordPress using the themes and templates, but I didn’t know anything about hosting a website, which is what I thought (think?) journalists are referring to, after having countless lectures about creating our e-portfolios on WordPress because it’s the industry standard. Now, I know that there are even more levels.

Anotha One – PHP

I hope you read my title in DJ Khaled’s voice. If not, the reference went over your head. I do know how to spell. Anyway, I can’t believe we’ve been in this class for 7 weeks already. This week we learned PHP basics. This is one of the most commonly used programming languages of today. It’s an interesting language because it can be written in PHP, then the output can be written as HTML. Another interesting thing about PHP is real numbers are called ‘floats.’ I’m proud of myself because I actually caught onto this new language really quickly. Learning PHP would not have been so easy had I not started with HTML, CSS and then JavaScript. I feel like the puzzle pieces are finally coming together. Another thing I want to note is I really liked the website we used for the tutorials. The exercises were fairly short, but easy to follow. It was also helpful that the instructions were written in comments for the exercises.

Thus, my confidence in my coding has increased. This may sound dramatic, but I really feel like my learning this new skill has inspired me to get back to learning. As a senior in college, I’m in a stage where I’m perfecting the skills I need for my desired profession. I’m so hyper focused on that, that I had convinced myself learning any skills outside of that would only be a waste of time. I’ve changed my mind. Having a diverse set of skills makes me more marketable for any field. In the event that I decide to switch gears, I have a whole gamut of skills that can transfer to a number of different occupations. I’m going to keep reminding myself of that as the year progresses. Who knows, I might switch up and decide to go into the tech industry.

Week 7: PHP & WordPress

This week, it was fun to learn PHP. I was not fully understanding everything that we went over in class last week when we started going over PHP and WordPress.org, but the exercises this week allowed me to really understand these concepts. It was cool to see how the all these languages work together and the similarities within them.

 

Diving Deeper

I have a love/hate relationship with Codecademy, and this week I really missed it. PHP is very similar to JavaScript (which isn’t my strong suit), so it would’ve been helpful to have Codecademy to provide me with extra examples. The PHP website doesn’t give you hints when you make a mistake on your code like Codecademy, so I was never sure what to fix in my initial code. I didn’t start struggling in the PHP lessons until I had to make a function that returned every number squared. It was helpful to see the screenshots and read the explanations of each task, but at times I struggled with using critical thinking skills to figure out which skill set to carry out.

After reviewing the WordPress site in class, I was shocked at how many websites are built with it. When looking at their themes, I noticed the templates looked familiar to websites I’ve used before. WordPress reminds me of Weebly because they provide templates you can follow to create the website for your needs. It differs because you get more creative freedom by being able to code behind the scenes. Seeing all the different themes got me excited to create my website and I’m curious as to how it will turn out.

Its crazy to think in the last 7 weeks I’ve learned HTML, CSS, JavaScript, jQuery, and now PHP. It’s interesting to see how the different coding languages interact with each other to create just basic visuals and output. This week I played my favorite game “Snake” on this random website. If I wasn’t in this class, I wouldn’t have realized the game was created in JavaScript. The creator even uploaded a link to his code that led me to his GitHub account. I was amazed that I actually understood some of his coding.

In case you feel like playing here’s the link 😉

http://patorjk.com/games/snake/

Passion Found

Toren Desuly is an web developer from Washington, D.C. who works for Seaberry, a development and design company in Washington, D.C.. Desuly began his journey with web development in 2007 when his first job was to be in charge of web presence of the company. Along with that job, he had to gain a knowledge of web development, so he enrolled in classes at George Mason University and began to learn basic HTML and JavaScript. After completing his time at George Mason, he began to take classes around the D.C. area from companies that provided extra training. Desuly has been an developer for 10 years now and has yet to look back. Desuly states that his intentions were not to become a web developer but, because it was presented to him, he took the opportunity.

Desuly holds the position as the lead web developer at Seaberry. His main structure of development is using the WordPress system. He stated that WordPress is used in many big businesses and, in his opinion, it is the best on the market. It’s also more accessible when discussing price. All of his work is done through WordPress, but he also oversees content management with all clients sites because content is important. “There’s no reason why you should have a great site with no real content,” he said. Desuly takes pride in his work and applies the principles taught to him while in school.

When asked what his favorite project was, he told me it was the D.C. Chambers website, www.dcchambers.org. This website was conducted for D.C. Chambers, a company that reflects on the diversity of Washington, D.C. and the business and tech aspect of the city. The website was developed with PHP. PHP is a scripting language, generally inscribed inside HTML. PHP hides underlying code from the client side. When you look at the site that was developed, you see a lot of movement, and a lot of content. A lot of information is given on the site. The site personally grabs my attention because of the colors and movement presented in the site. Another one of his favorites was the D.C. National Environmental Site, https://www.neefusa.org, which was also done in PHP. He states that these to sites were fun to work with due to the different graphics, colors and content

Desuly has never used his talent to freelance. He has always worked for companies. In his opinion, he believes that the freelance time is not worth the little money it brings due to smaller clients, where as his company brings bigger clients.  The resources provided by his company were also a factor of not freelancing his work. With freelancing, you only have what you can afford and what you know, but with other resources and others around you that you can lean on, he believes you can accomplish way more. His favorite languages to work with are PHP and HTML. He states that you can do so much with them and they are the basics, so you can’t go wrong with them. He first learned HTML and then began to grow from there.

When I discussed that I was studying development, he asked me how I felt about it and how I felt everything was coming along. I stated that this is my first time doing anything related to coding and, in this experience, I am currently learning something new every day. He was very excited that I was interested in development and that I wanted to continue to learn more. He continued by giving me some tips that he felt was important for me to know. He first told me to get as much training in school as possible because that is the best way to learn it, with guided help. He also told me there are never enough classes you can take. There are always new language classes that you can take, or events where other developers get together to teach each other things that they learn. He also stated that development and design are two different things, but if you can do both, that makes you more competitive than someone who just knows one. Content management and design classes are very vital and you can never perfect your craft too well. He also told me that having knowledge with the Adobe Suite also sets you apart because development and design are evolving everyday. I mentioned to him my minor is graphic design and I am very fluent with the suite. He also emphasized networking and getting to know others, and to me that is very important and something they teach us at Howard University constantly. Desuly says that he will continue to develop until he finds a new passion, but this seems to be his for the time being.

 

What’s Next?

This class was definitely a challenge. I was not sure I would make it to the end, grades are not out yet so we will see, but the prospect of making a site for my dad got me through. He absolutely loves it and wants to add a picture of us to the “About Us” page, which was suggested by someone in the class. Like I said a few posts ago, I’m not sure if I want to continue doing web development.

This has been an educational experience and I enjoyed doing the more cosmetic coding. But there is something unpleasant about JavaScript, jQuery, and PHP. If I continue developing skills in this field, I would need to go back and spend some time reviewing these languages because these are the ones I want to work with.

I will take some time to recover from this semester, my last one at Georgetown, and then start my learning again. I will be supplementing the courses on Codecademy with those on the Odin Project. They seem to offer free projects and the opportunity to actually build things. I’ll let you know how it goes.

A big thing I want to work on is creating a working contact page from scratch. I still have not figured out how to make it link to a “Thank you” page and still email the message to the account’s email. Especially once I change it over to my dad. I want to continue working on this site, create more content and possible make it a little more interactive if possible. I’ll be working on the host site, along with my learning and probably start both in October when I return from traveling.

I hope to be relatively proficient, if possible, by December or January, so that I can write code more quickly and efficiently.

Custom Post Metaboxes and Styling My Site

I spent most of this week working on creating a custom metabox and custom fields for my site. As I mentioned in last week’s post, I created a custom post type plugin to log all of my runs. I was able to create a custom metabox called “run details” with three fields — neighborhood, date, and time. However, I’ve been unable to get the data that I enter into the custom fields to save and echo out to my post type. I even rewrote my custom post type plugin according to the reading list example Greg showed us, but haven’t been able to get the data to save. So I now have two versions of the same plugin written in different code, but both have the same issue. I spent more than five hours troubleshooting this on Friday night, but to no avail. For now, I’ve moved onto styling my child theme in CSS. I did figure out how to get my custom posts to show up on my homepage, which was one of the questions I had last week.

I played around with adding this Strava plugin to my site, but the reviews for this plugin mentioned that it is not mobile-friendly. I confirmed this fact when I downloaded and installed the plugin, created a test post using the suggested shortcode, transferred the files to my live site using FileZilla, and then pulled up that specific post on my phone. The reviews were (sadly) correct — the table showing the data about my run bled out of the area of my post, and looked really bad. Because there are very few Strava plugins out there, and because this flawed plugin was the highest-rated and most often downloaded one, I decided to instead use the shortcode provided by Strava to insert a text widget into the main sidebar of my site. I did this on my local site to see how it would look, and then went ahead and added the text widget to my live site. I know this doesn’t count as a code modification, but having my Strava account linked in some way to my site was a very important part of my project. Perhaps the addition of this widget can count under the “content” grading criteria instead.

I’m likely going to have to abandon my plans to create a lightbox photo gallery due to the fact that I’m running out of time to work on this project, but I’m still hoping to build a featured post carousel onto the homepage of my site. I’ll also be writing some content so that I can have at least five posts on my live site.

I’ve been loading my plugin and theme files onto my live site via FileZilla. It’s so exciting to see my changes show up on my live site. I did have a minor snafu when using the FTP server the other night. Something happened when I was replacing my CSS file, and when I refreshed my live site, all of my styles had disappeared and my site was showing up in Times New Roman with bulleted lists. I may or may not have cried for a few minutes. I had to delete my child theme files from the remote server and then re-upload them using FileZilla, and that fixed the issue. Crisis averted. I’m hoping not to have any more scares like this before the August 6 project due date!

The Final Stretch

This week I found myself feeling satisfied and relieved to be taking a break from coding my final project. I went into the last class knowing that I wanted to complete a few tweaks to my WordPress site, wanted to collaborate with my classmates on figuring out the final pieces of code, and coming to terms that I don’t fully understand why my code doesn’t always work. I found myself Googling more than I had anticipated that I would be, and I relied heavily on a number of PHP and CSS code testers to be test my code. At times, I was confused as to if I was making updates to my local or live site…I have a case of “too many tabs open at one time” syndrome. In a way, it was good. It forced me restart my thinking from scratch and gave me a minute to walk away from the code.

Admittedly, I have grown frustrated with the Final Project. I had a feeling I would. I spent SOOOOO many hours trying to get all of the custom post types to work, then getting the meta boxes to work. The frustration quickly turned to anger. I’d be ecstatic if someone could look at my code and find how to improve it so it could echo the information correctly (or at all) the actual post.

Another major shout out to everyone in class the other day. Thanks for helping answer all of my questions!

I’m happy to be able to take a step back from the code. My plan is to quickly jump back into my WordPress site and continuously develop the site, content, and my coding skills. I hope to be able to go back to Code Academy and re-work on the lessons at a slower pace to allow me to soak in the information.

Onward and upward. I hope everyone enjoys the site.

Github: https://github.com/amaliaks/Final_Project_Amalia

Site: http://threecheersfourfood.com/

Nearly There

After weeks of trial and error and tears, the site actually looks like something! Well more than something, it looks pretty good. I never really thought I would get to this point but I am excited to be here.

This has been an experience. For the last few weeks I have been focused on the code and design. Ensuring that the everything works. I had a lot of trouble creating the child theme but found a plugin, Child Theme Configurator, that writes the necessary top code for you and allows you to make edits. It even saves the files in the appropriate folder.

Lots of Googling as always, to keep thing moving forward when I get stuck. I will be testing the site again today to ensure that I really have not broken all of WordPress. It is a terrifying though as I finalize the last few details. I’m not sure the API will be a part of the site, but if all goes as planned between today and tomorrow then it will be there.

On a completely different note, I an very excited to remove XAMPP from my computer. My system is seven years-old, basically on its last legs, and running the server is hasting my laptop’s death march. The freezing is getting pretty old and I need this computer to last a few more months. However, the class will be over soon and I can lighten my system’s burden. The GitHub app is not much help either.

Will I voluntarily do this again very soon? Probably not. But who knows? When I’m not in my last semester and go over everything we have learned this summer, I might find myself wanting to do this. The process was not completely unpleasant, and thankfully there are wonderful things like plugins and widgets that make life much easier.

Wrapping Up PHP and Reading Up on Project Management

A small update on last week’s PHP assignment because I was still having trouble with it on Wednesday: I think I was finally able to get my basic poll to work and show up correctly in my browser. After doing a bit more Googling, I think my issue had something to do with the way I was naming my files. Once I adjusted the name of my PHP and HTML files both in the code and in the individual file names, the poll ran correctly.

In terms of the readings for this week, I have to say being totally new to project management, it was a little difficult to keep up with our discussion last week. I was still confused about the difference between waterfall and agile methodology. However, the readings — especially the agile manifesto and the best practices video — helped me better understand the agile methodology at least. It kind of seems to me like this is the more popular method since it’s more team-oriented and focused on customer input?

I really enjoyed Jared Spool’s piece on design thinking, particularly the section about design being more than just a way to make things pretty, because that is an issue I’ve found myself having as I’ve begun working on my project. In terms of my project, I’ve been slow to start this week, but I hope to have a child theme created and begin working on a custom post type for my blog before Wednesday. I think I’ve been too caught up in thinking about how to make it look pretty — thinking about which theme is the best looking, what aesthetic I want — rather than remembering I need to be focusing on functionality and the idea, as Spool puts it, that design is about problem-solving and end-to-end solutions. On a less serious note, I also really loved his reference to the stone soup folktale because I’m pretty sure I heard the Russian version as a child. 

Finally, I’m including a link to my WordPress site here once again and want to give a shout out to Victoria for answering my questions about how to set it up last class! Also, here is where the code will show up on GitHub.