May Not Want To Do This Again

So this process is still going and I’m not a fan. I’m still in the process of simplifying the page and giving it that professional and clean look. It is also very tempting, and I often fall into this temptation, of doing a lot of the edits directly on WordPress. It’s easier than jumping back and forth to do the simple things like changing the font or doing quick simple fixes.

However, I’m very sore I will not become a web developer or do this for fun. After fighting with FTP and trying to get WordPress into my GoDaddy, I’m very over it. I’m not a fan. I really don’t think I will do this from the developer side again. On the other hand it is nice knowing I can. It is rewarding going into Sublime and being able to do things, or looking at the ridiculously complicated code and sifting through to the place I need to edit. That’s cool.

What is not is trying to figure out how to make this PHP code work. I’ve been fighting with it for ages and I’m not sure how much longer I can before giving up. I barely got the code to work when we added the few lines to our web pages so I doubt I will actually make it work. I have looked through a few plugins and I’m choosing among a few. I might just use one and stop stressing myself out.

Again, I am not a fan of this process. When this is done, I’m sure I’ll be very proud of myself and happy I did it, but it will be a very long time before I CHOOSE to do this again. I jokingly told my friend that if I ever did this for anybody, that is how they would know our friendship is solid.

Putting one Foot in Front of the Other

Well, it took me until today to realize that I’d completely forgotten this.

I think I overall understand API’s? Or, at least the general idea and what they’re used for. It was helpful for me to look up different kinds of API’s etc. Honestly right now I’m mostly feeling very head-in-the-sand about the final project. (Like the feeling after a fun weekend and you’re scared to actually look at your bank account. So, I know I’ll feel better and like I have it more in hand once I’ve actually confronted it.) I’m quite confused and need help with the whole adding a subdomain thing. I’ve looked up the “adding a subdomain” page on Squarespace, but I’m not entirely sure about some of the things they’re saying. This misunderstanding on my part is majorly slowing me down.

I spent most of this week both reviewing and editing the photographs I’m trying to use/writing up the content, and muddling through the WordPress/Squarespace subdomain issue, and also ruminating on some of the stuff Andy suggested last week–ways to make the whole site a slideshow. Last week, Jaclyn very kindly sent me a site that has a file converter for MP4s to GIFs.

Another issue I’m having is just that my idea seems to be quite different from everyone else’s, so the questions asked in class don’t necessarily pertain to what I’ve been working on (or lack there of, given aforementioned issues.) But, it has been helpful to hear about HOW people are going about solving their problems–where and how to look at certain problems in order to solve them.

I have noticed that without doing Codecademy and with feeling kind of frozen on the final project that I haven’t been coding as much, and that has definitely been detrimental to both my understanding and output. So. I definitely need to commit to diving back in. Something I plan on doing starting tonight!

Slowly but surely

This week was definitely a reality check as I dove more into working on my final project. I thought I would have a better handle at incorporating elements of HTML, CSS and more into our modifications but I’ve found myself Googling a lot more than I thought.

Meeting with a study group this weekend was definitely helpful, but I’ve ran into a few questions that hopefully can be answered and potentially discussed in class this week:

  1. At what point does coding modifications end and WordPress modifications begin? Is there a general rule of thumb we should be following when making edits (content is made through WordPress, style is through coding, etc.)
  2. How do we modify items in our theme PHP files when they are written in PHP or HTML? I have come across instances where there seems to be PHP (or perhaps HTML we just haven’t learned yet?) that I’d like to change, but I’m not sure how we would in our child theme.
  3. Can caching be explained further as we make our modifications? It has played a large role in my ability to refresh and make edits to various parts of my page, and I hope we’ll be able to talk more about this in class, ways around it, etc.

The readings this week were definitely a nice break from working through Sublime and Google – I especially like the API YouTube video, as Savannah mentioned. It nicely (and concisely) talked about what our topic for this week, and was a nice primer to what I’m sure will be a great conversation in class.

A quiet week

This week was one of the quieter ones we’ve had because now its just the final push to the end. For me, this week was trying to put a lot of things into place for the final project, and there were some setbacks.

Overall I have a few things I need to set up before I can get into the meat of coding. Since I’m making a personal site I need to have some good photos of myself, and I also need to get the lines for my designed template made. I’ve reached out to friends to take photos and get some of the background images designed, so until then I’ve been retooling just the basics.

I hope to have the other stuff done this week, but life tends to get in the way. The deadline is approaching pretty quickly so I’m beginning to get nervous about puling everything off. But I’m sure I’lll have a better idea about things this time next week.

As for the readings, I’ve really grown to enjoy the stuff we’re looking at. The video about API‘s was informative and really synthesized what we’re going to talk about this week. However, at this point it seems like we’re in the nuts and bolts of our final so its hard to really pay attention to new information.

API Readings and Project Update

Readings

In terms of this week’s readings, I’ll echo Allie’s thoughts in that I understand the general purpose of APIs, but, like she pointed out in her post, I’m not quite sure how they apply to our final projects and am a little confused on the more minute details, like resting APIs and JSON.

Final Project

I have to say I’m feeling a little discouraged about our final project. I had issues over the weekend with my MAMP not starting the servers when I prompted it to and couldn’t access my local site. I was able to figure out how to get the app to work with a few hours of Googling and was feeling pretty good (and like a real web developer – yay!) but quickly realized that I’ve now stumbled on a new issue that’s still preventing me from accessing my local site.

My new problem is that when I run my local server and type in the address for my project (http://localhost:8888/finalproject/), I’m taken to the wp-admin page below:

I’m a little confused about why I’m seeing this page because it was my understanding that we had already installed WordPress in class together a few weeks ago? When I go through the final steps of installing WordPress here, I get a page showing me a bunch of database errors telling me certain files don’t exist:

And finally, when I click “login” at the bottom of the errors page, I get the following error message on a new page:

So far, Google has been unsuccessful in helping me figure out what’s wrong.

I didn’t want to lose time so I’ve continued to make changes to the code in my htdocs, even though I can’t preview it to see if the changes are correct. I created a child theme last week and have been working on creating a custom post type, which is probably my most complex customization. As suggested, I’m modifying this book list plugin.

I will keep Googling to see if I can find a solution, and, hopefully, I can get the local site issue resolved before Wednesday or can get help fixing it during class. In the meantime, I have a few other questions:

  • We talked about how some of the more superficial changes should be made on our live site, rather than our local site because the changes won’t necessarily transfer over, and I want to know when we can do that? Should we wait until we make all of our more back-end changes or can we go ahead and make these smaller changes to our other site now?
  • I think we may have covered this in class as well, but how often should we be saving the changes we are making to our GitHub repository? Is it enough to save it after we’ve completed a customization or should it be more frequent?

All About That API and Final Project

This week, I have made some progress on my final project but not without kinks. I tried to open up my local host but again, it lost its connection on the server, so I have had to make some progress on the actual domain. Sometimes, it’s frustrating because I don’t know what to do to open it up.

I installed my header image and am now putting links on all my work, but am trying to add in “additional CSS,” to make sure I am coding. I went on GitHub to look for some CSS but my code is not working for some reason on WordPress. I am also having trouble making sure Greg will be able to see any changes I have made in code.

I added a plugin for Instagram which required some coding because I had to put in the id. I am also trying to figure out how to embed audio since they said the files I have for the podcasts are too big. I need to figure out how to make this website compelling and podcasts interactive.

Overall, it’s a slow and steady process. I am still trying to brainstorm ideas on how to make my website creative. The readings this week were interesting though. I enjoyed watching the “What is an API” video because of the “waiter” analogy. I thought that was a great analogy. The “Rest API concepts and examples” video was a little more confusing and had to watch it several more times to understand it.

The WordPress Rest API intro page was interesting. I already knew how to use WordPress before this class but never delved deep into how and why it works, so it was intriguing to learn how Rest API makes it easier to use WordPress in new ways.

Some questions I have are:

1. How can I embed audio in when the files are too large?

2. How can I add CSS into the WordPress domain when it’s not registering?

3. Why isn’t my localhost working?

These are questions I need to address next.

Baby steps towards the Final Project

Readings:

I’ve had some experience working with software developers and implementation specialists who have explained the benefits of an API. When I worked at Oracle as a Human Capital Management Account Representative, our selling point was Oracle’s open-API standard, or the fact that our applications could talk to virtually anything. In completing the readings from Free Code Camp and WordPress, I was able to get a better understanding of how APIs are used outside of the enterprise software sphere and are used every day by people like you and me. In the past, I’ve heard about REST APIs, but I don’t understand their importance? How would using a REST API on our WordPress site be beneficial to our page? Or, how would this practically translate to our final project?

Update on Final Project:

I’ve finally started working on my final project. It’s been intimidating to say the least. I’ve done all of my work on my local server and haven’t attempted to move anything to the Filezilla application. Should I be actively syncing these two together?

I’ve separately created a CSS file of tweaks that I want to make, but how do I incorporate this into the existing code? Should I create a separate CSS file within my child-theme and have it run last?

My biggest concern is updating the plugins that I wanted to incorporate. How do we do this? Is there a ‘how-to’ document that you’ve found particularly useful online that we should try to follow?

Additional overarching questions:

  • If we are adding HTML, CSS, PHP, etc. to our WordPress site, do we create separate files for these? Where should we be updating the code?

As the final project approaches, I’m realizing how much more time I need to dedicate to the project. I’m starting to think that my final pitch post may have been over ambitious…only time will tell.

APIs and Customizations

This week we learned about APIs, or Application Programming Interfaces. I got the simple and straightforward analogy from this video, “What is an API?,” comparing APIs to waiters, but I am missing the big picture. APIs connect requests to data outputs, but what is the nature of the request and what is the data used for? Essentially, what is their purpose? In this video, “REST API concepts and examples,” we see how we can request data from YouTubes’s Facebook page and see how many likes it has, but you can see that simply by viewing the Facebook page… I know there is a lot more data that can be requested though, so is that the main point of APIs? Also, why would someone send a request to my website, “A Life Surfeited,” and should I concern myself with this? How can I use API to serve my customers?

I have spent most of today customizing my website and making Project notes in GitHub of things I want to do, change, add, etc. I also have many questions so am looking forward to our workshop class on Wednesday. The biggest thing I’m stuck on right now if finding the correct files to alter. I know I need to copy my theme files and put them in a child theme folder, but I’ve opened every file and am not sure where to begin. For example, I want to alter the padding around my website title/header, but I can’t find the right code in the theme header file. Or, I want to remove “author” as a column on my posts, but I can’t find the code for it anywhere in the post file. I’m sure I am going about it incorrectly:/ And google isn’t helping with this one – I keep reading that I should be adding my own CSS files (who knows, that might be right!).

I think once I get past this hurdle, I will be in a good place to knock out all the modifications I want to make. Then it will be on to testing on the live site and eventually posting live! In the interim, however, I plan to spend each day adding content to the site because mine is a travel blog, my goal is to have 6 total posts with images from places I have been recently. I also need to focus on adding and modifying a widget for my interactive map. I have narrowed it down to 3 options and will have to choose which is best based on the code (once I figure out how to find it!).

Wednesday night can’t come soon enough! 😛

Cheers,
Jane

APIs and Building My First Plugin

I had heard of APIs before taking this class, but this week’s readings and videos did a good job of breaking down this complex topic. The kitchen analogy used in the “What is an API?” video was helpful in terms of understanding how an API works as a messenger that communicates user requests and delivers responses back to the user. I recently booked a flight using the online travel service Kayak, and did not think about the fact that Kayak was using airline APIs to find me flights based on the parameters I defined. Kayak accesses the airline APIs and aggregates information from them based on user requests.

I also tried out one of the examples provided in the video about REST APIs. I typed the sample URL into my search bar and tweaked it for my hometown of Mendon, Massachusetts, which resulted in a page written in JSON that allowed me to access the GPS coordinates for my hometown (latitude: 42.1056525, longitude: -71.5522859). I then went to the main Google Maps site and entered these coordinates, and was taken directly to the center of my hometown on the map. I will have to do a bit more research on the topic of APIs in order to more fully understand how the concepts can be applied to WordPress. I imagine that APIs are probably used in a lot of plugins that access data from outside websites, such as those that pull in data from Twitter or Instagram feeds.

I spent this weekend working on the modifications for my WordPress site. As I mentioned in last week’s blog post, I was able to create my child theme and activate it on my local site, but I still have to play around with the fonts and colors of the site. I plan to do that towards the end of my project, once all of my other modifications are complete. One specific question I had regarding editing the styles.css file for my child theme is, how do you edit the fonts if your parent theme uses the Font Awesome toolkit? For example, I tried changing the font for my site header, but it is not working, and I’m thinking it’s due to the fact that my parent theme uses Font Awesome and thus has multiple CSS files. How do I change the fonts in this case? 

I also decided to tackle the custom post type modification by building a custom post type plugin. I was able to write the code for this plugin using these instructions, but ran into a lot of issues on the way to getting it to work. For example, when I tried to activate the plugin from my wp-admin panel on my local site, I kept getting the following error:

Parse error: syntax error, unexpected ” => array(‘ (T_CONSTANT_ENCAPSED_STRING), expecting ‘)’ in /Applications/MAMP/htdocs/finalproject/wp-content/plugins/therunningglover-run-post-plugin/therunningglover-run-post-plugin.php on line 18

I could not for the life of me figure out what the issue on line 18 was, and so back to Google I went. Luckily, the Stack Overflow gods were there to help out, and I figured out that I had forgotten a single quote (‘) on line 18 of my plugin code. I fixed the issue, refreshed the page, and the plugin was activated. However, the custom post type was still not appearing in my admin panel, and so I decided to go back to square one and rewrite my code using the steps listed on the WordPress codex. I got it to work within five minutes. Lesson learned — use the WordPress codex first. I now have a custom post type on my left admin panel called “Run.” Now I’m working on adding a custom metabox called “Run Details” with metadata (custom fields). One question I have is, how do I get my custom post type posts to show up on the home page of my site, rather than just under the Blog page?

This coming week, I want to download a plugin for Strava and see how I can use it to pull in information about my most recent running routes onto the sidebar of my site. When modifying the code of an existing plugin, do we need to create a “child plugin” (if that is such a thing)? I will also attempt to build a lightbox slideshow to display some of my photographs, but may end up using a plugin for this. I’m also planning to load some of my files using the FTP client later this week, to ensure everything is working correctly on my hosted site. I’m feeling a bit overwhelmed at all that I have to do in the next week-and-a-half, and am hoping that I can at least get three quarters of my proposed modifications done before the final project deadline.

Regarding GitHub, should I only be syncing files that I’m coding myself? For example, the plugins that I downloaded and added to my page from WP also synced to my final project GitHub repo. Should I remove the code for these plugins from my final project repo since these are not something I coded myself? If so, what is the best way to do this?

Attempting to Build Custom Form, No Success… Yet

This week I spent a lot of time trying to create a custom form for my site and thus far have not been able to get the form to function properly. One struggle I keep running into is that I update the code in Sublime, but given that it is not showing on my site, I can’t figure out where the errors are or what the right next step would be to fix the plugin. I’m not in total panic mode (yet) as we still have time to research, update, and problem solve, but after reading numerous articles on the topic I will say it is a bit overwhelming to try to understand what the problem is and how to fix it. I think this is partially because, first, as a newbie to the coding world, I really don’t know what the problem is I just know the content is not working. Second, there are many different solutions to a problem with code so when I find one solution, I use that as a jumping off point, but then find myself reading other solutions and recommendations that muddle my code and make it ineffective.

I’m really glad we are spending next class working on our sites, as I will be a lot more productive once I can get through some of these hurdles and on to the next phase of updating my code.

As for the reading, I thought the first video that compared Application Programming Interface (API) to a restaurant, with the waiter (or the API) serving as a ‘messenger’ was a very easy way to explain the program. The other readings, however, were a bit more in depth and lost me. For example, I wasn’t sure what this article meant when it said that “if your website’s server is making the API request, then your website’s server is the client” – isn’t the client the one interacting with your API? Is an API , for example, a separate, private page that hosts the content we acquire from visitors filling out a public form? Or is it more something that visitors interact with directly? Also, is an API something we should build on our own, or more a term/concept to be familiar with, but not necessarily something we would create?