Posts

Showing posts with the label code

From Sketch to Prototype

Image
After spending a considerable amount of time doing market research, analysis, client feedback, community polls, and even a SWOT analysis of the current site Kelly and I were able to move from a rough sketch of a redesign to a cleaned up mockup all the way to a high fidelity prototype! It is still a work in progress but we are able to code in HTML and CSS a functional mockup to display our redesign. We used tools along the way to keep track of our progress like Trello as well as Balsamiq to complete our sketches. Our prototype is available on Github at  https://github.com/victoriarainc/lgbtCenterofRaleigh . Kelly was able to find a Bootstrap layout called Modern Business that implemented a lot of the styles we had in mind for the site. It is already responsive, much more modern, and introduces clean navigation throughout the site. The prototype is still in progress but we hope to have it completed by next week!

Building From Scratch

Image
As my graduation date slowly approaches I now have the freedom and the tools to start building my own applications from scratch. I came into this program three months ago knowing I wanted to build web pages for my photography and handmade crafts. Now I finally can! Even better, I can create a portfolio app that showcases all of these new skills as well as my personal projects. For the last couple of days I went ahead and dived into Handmade by Vi - a responsive website that dynamically displays available products and service using React, HTML, and CSS. My first steps were to sketch out a rough idea of how the application was going to look. I picked three colors, created a layout for each page, and loosely linked how the navigation was going to render. In a few hours I was able to develop the barebones and functionality of my site. I chose some pretty simple and clean designs,  added a media query to handle mobile view, and implemented a few dynamic routes for my 'shop' page...

Children and Inheritance

Image
This past week has been a more in depth look into React. It turns out there are many different ways to approach compartmentalizing code. Organizationally, React likes to keep everything in components. This way code can be written for a specific section, including its logic, its HTML, and its styling, all in one place that is separate from the rest. These components are likely to still be a piece of the whole page so in order to avoid typing the same code over and over there are a few different approaches. Inheritance is exactly as it sounds, small components can inherit properties from the section it is inside of or the larger component around it. Just like last week, these properties are passed down in the constructor. They can include defined variables, functions, or even state. In a way, inheritance is a method of linking the separated components together to allow for more reusable code. Children components are very similar. Some properties can still be passed down to childr...

Earthquakes?

Image
No, not real earthquakes. Just another web application! I'm not entirely solid on React yet (still on shaky ground) but I've taken my first few steps. Set up is not as difficult as I anticipated. Rather than starting every project from scratch our activities are now set up in a way that simulates a more realistic situation. We're given a set of files and basically told to fix it. For this application that is covering how to map over an array (loop or iterate over a list in order to apply a function to each item) we are using a government API to access data about earthquakes. This data updates in real time and only the last hour's activity is displayed. This is possible through React! As mentioned before, React allows a page's components to update without a page refresh. It immediately creates a better user experience because it isn't up to the user to make sure the page is properly loaded or displaying the newest data. The biggest learning curve is organiz...

Classes vs Constructors

React is built on a lot of ES6 syntax (an updated and more modern way to write JavaScript) and there are a few more concepts in JavaScript we're learning about before diving into anything else. Some of these concepts are function constructors, inheritance, prototypes, and classes. From what I understand these don't necessarily come up very often when building apps in React but it is an important concept to understand before moving forward. Essentially, function constructors work like object constructors. They can be seen as a schema, or a model, to be called on later when required. When building a lot of the same type a prototype can be used so that all of its children can inherit its properties. In less vague terms a prototype is exactly what it sounds like - a simply constructed piece that can be cloned over and over but look exactly the same. Classes on the other hand also seem to be the same exact thing. But prettier! Classes are what is called syntactic sugar for const...

Intro to React

Image
The last four weeks of my time at The Iron Yard is set aside for 'specialization'. That is, we as students had the choice between learning Ruby, React, and Java. Given my background in visual arts and design I started this programming boot camp assuming I would go in to front end development. After spending the last four weeks with back end fundamentals I have even more reason to believe I would be happiest working with React, the front end option, over the other two. React itself is a library for JavaScript written to keep up with the changing demands of web applications. On a page like Facebook, the creators of React, there is a need for constant updating. Without reloading your page you should be able to see when someone likes a post, when someone sends you a message, and every time someone you follow posts a status. This requires specific containers making updates without the entire page refreshing each time a change happens. React's speciality is handling these cont...

Code Snippets: Storing Data with Mongo

Image
Now that I have schemas in my models folder for both users and snippets I'm going to need a way to store them. I could use a SQL database which would store the snippets in the user table with a foreign key or a NoSQL database which is a bit more flexible. Even though SQL is the better choice, I am more familiar with Mongoose then Sequelize (both are the middleware used to help Node talk to the database).  For now, I will use Mongo and Mongoose to store the data from my application. Since I put each of those schemas in their own file I was able to export them. Once they were exported, I could require them in my main file along with the routes I created for each of my pages. I made a route for the login, the register page, the home page, and a place to render the results of a search. All of these are referenced in my app.js - the index of my project. In that same file is where I declare a url for Mongoose. Mongoose needs a connection between my application and the database inside o...

Code Snippets

Image
I have no idea if this is the best approach to a project but I'm implementing the MVC methodology to this web app that I'm building. As in, I'm first going to build as much of the model as I can then as much of the views as I can before working on the controller. As I mentioned yesterday, what I do know is that I will need two schemas for this project - one for the snippets and one for the users. I will be using a noSQL database because I already know how to use Mongoose to connect Mongo to my Node application. One trick I knew I would have to add in order to 'link' the two collections in my database is on line 15. I knew I would have to give each snippet a way to connect to its owner in order to only display that owner's snippets. This probably would have been easier to do in a SQL database where tables have a bit more structure and can include foreign keys to reference other tables. However, I wanted to use tools I have already learned how to use to accom...

SQL Equals Spreadsheets

Last week I learned about Mongo - a NoSQL data structure. This week we've covered the opposite. SQL is much more structured and rigid but does allow for an 'easier to organize' approach. More time and thought has to be put into a table's creation. Extra data can be added after the fact but it is easiest to have all of the data you know you want to collect ahead of time. Basically you're turning your raw data into a spreadsheet. That is, SQL is great for data that already exists and needs to be organized.  Unfortunately most of this happens behind the scenes and is executed in the command line. That means I really don't have any images to share. Even when turning in my assignment I had to export my raw data into a file and upload that with a README file explaining what I did to achieve that success.  Tables are just organized data and can be joined to filter out needed information. Those queries look something like this:  SELECT title FROM todos WHERE com...

Salt Your Hash!

Image
Security is a huge topic in tech. As technology progresses so does cyber security. I know basically nothing about it either! However, we did learn about encrypting passwords yesterday and tried our hand at two different ways to do so. One package is bcrypt and another is Password. I played around with each and the biggest difference is that Password allows for logging in through twitter or facebook. Pretty neat, right? I didn't get the chance to play around with it that much though. I did local encryption instead. This all still looks foreign to me but a great benefit of Node.js is the ability to use these packages when you need them with the code you already have. As I get more comfortable with the language I'll be able to create a multi-page application with authentication, validation, and password encryption!

A Mongo and A Mongoose

Image
Last week we covered databases! Super exciting, right? It only makes sense, though, that the majority of back end development would be storing, accessing, and updating data. There are quite a few tools available for Node.js and the ones we covered are Mongo and Mongoose. Mongo or MongoDB itself stores data flexibly. Why does that flexibility matter? It is perfect for sets of data that are incomplete. If I had a list of contacts I wanted to store but I didn't have everyone's emails it wouldn't be a big deal - those email addresses would just be empty. Mongo stores the data and Mongoose is a tool that accesses it for you. This is the secure way to retrieve data and validate it rather than having potentially sensitive information stored right in the code for anyone to see. Mongoose is pretty straightforward to use and I implemented it into my robots database (that thing again!). In a nutshell, I was able to swap out the database I had stored in a file and put it into Mongo o...

Web Concepts and Back End Languages

Image
The last 48 hours have been super intense! Not only am I learning basic web concepts about how information is sent and received over the internet but also the language used to manipulate that information. Those languages are also built on packages which are chunks of code called modules. Those packages all have their own syntax that may or may not interact well with other packages that are needed. My best analogy (roughly) is trying to create a custom greeting card for a customer. I have dozens of stamps and dozens of paper punches (these are analogous to modules because they are pre-made tools I use to create an embellishment that is then used in addition to my other crafting skills that make the card). These stamps and punches were all purchased at different places so not all of the styles and shapes line up with one another. I have to use a specific method to make those 'packages' work together to produce the card I have in mind. All of this code is completely done in th...

On To Back-End!

Image
After learning the basics of HTML, CSS, JavaScript, Git, Terminal, and GitHub I'm now moving into back end development! Our first reading is on Node.js which is neither a language nor a program but a way for the JavaScript language to interact with browsers. I'm not entirely sure what that means yet but I'm confident I will by the end of the day. Until then, I'm working on our latest weekly project. It is a search page that uses the iTunes API to find music! The hardest part so far has been figuring out how to play audio and that was ultimately easier than I expected. I'm very fortunate to be learning how to code now with HTML5 and CSS3 that have a lot of included tags and elements. Back in the day I'm sure these projects would have been much more intensive! Here I have some JavaScript that begins a function when a search result is clicked. Once it has been clicked, the audio file is plugged into the HTML (hardcodes it) and displays the artist's name ...

Oh What A Week It's Been!

Image
If you haven't heart already - The Iron Yard went public on Thursday that it's locations will be shutting down after all current students complete their courses. This, naturally, impacted a lot of us emotionally but I know, for myself, that I'm still in this to learn as much as possible. I'm incredibly lucky that the staff here has built the Raleigh campus together and they also will stick this out until the end. Outside of that, this week was the final week of front end development before we move on to back end. Thursday and Friday we broke into groups and were inspired to begin our Hackathon project. Our theme was 'Mashup' so my team decided to do an arcade style page with multiple mini games. I, specifically, offered to do a Choose Your Own Adventure Game. I chose to write a 'tour' of Iron Yard's Raleigh campus. After a greeting and an input field for your name, you enter each room as you choose. The tricky part was to make sure that once a room...

Hackathon Adventure

Image
As we round out our month of front-end development (I can't believe it we've come this far) our final task is to collaborate on a project. We've been challenged to complete a 48 hour Hackathon with the theme of 'Mashup'. My group has picked an arcade-style page that includes multiple mini games that are all interactive and show off various skills we've learned. My particular mini game is a Choose Your Own Adventure game, or as it turns out, a Tour of Iron Yard with Stacey our Campus Director! I'm not as advanced as I would like to be but the logic I implemented to complete the task worked! It got pretty messy pretty fast but I was able to accomplish a series of alerts nested in one another. My tour is three rooms long and once you 'enter' a room it can not be reentered. I did this using nested if statements linked to dialogue boxes with template literals. This worked great but if I ever decided to add additional rooms it would get close to impossib...

So Fetch!

Image
Last night our daily assignment was to create a web page from scratch. It's super easy now to auto populate some simple HTML and complete the organization of the page through DOM manipulation in JavaScript. The difficult part was using fetch to pull data out of an API in order to display search results. I did it though! Once the class realized that there was some extra security going on and we needed to read the next day's lesson to learn about CORS we got it all sorted out. I made the colors pretty obnoxious just for fun. I'm starting to get the hang of the hover styling in CSS. I also just discovered google's color picker! Just search 'color picker css' and there at the top of the page is a sliding bar that allows you to manipulate the color in the box. That color coordinates with a hexadecimal code or rgb set of numbers that CSS understands. Voila! Beautiful colors that aren't super generic! I'm still pretty rusty on the fetch method of request...

Hazzah!

Image
As we're going through new material I've started to rely heavily on our reading as a resource. My objective throughout the day isn't to be able to build code from scratch by myself - it's to know what resources to use to do it. Half of the battle is knowing what tools you need and the other is how to implement it. If I can figure it out using the reading from the night before I know I'm doing something right. Some of the students are reaching the part of overwhelmed that I hit my first day. They had previous background in HTML and CSS so they breezed through the first three weeks and now feel stuck. It sounds condescending to recommend the night's reading to them but that's how I've been getting through the whole time. Take, for example, XMLHTTPRequests. After the reading and the lesson I learned they facilitate the process of my code retrieving data from another 'location' on the web. Knowing when I want to use an XMLHTTPRequest and how to wri...

Birthday Coding

Image
It's my birthday! But it's also Monday so I'm back to programming just like any other week. I'm ahead, for now, and spent the weekend working on a personal project! Instead of sketching it out like I know I should I jumped right in and expanded on my project until I got stuck. Then, instead of working out that knot in my code I just jumped into another project instead. Probably not best practice here. On nights and weekends I'm still crafting and practicing photography. I'm trying to build a site for each of those. Ultimately, what I would like to do is build just one single site that ties both hobbies together. I don't have anything down on paper yet but I'm willing to bet I will tonight. As these sites progress I'll update on my bugs and how I worked through them. Right now, on my photography page, I'm have the hardest time getting my images to work properly. I have them embedded in my HTML just fine but CSS is a different kind of cranky. I c...

I Survived Week 3!

Image
JavaScript is if loops, DOM manipulation, template literals, nested arrays and objects, and a load of new commands I have literally never worked with or even seen before last week. Here I am feeling like I've taken the first baby step (a huge step!) in to the right direction. I can actually start a project, ask the right questions, and use the correct resources. I may not be able to finish. It may take me all day. But I can start and I'm not going to take that achievement for granted. https://victoriarainc.github.io/week-02-project/ This page isn't beautiful or interactive but all that was required of me was to print those same answers to the console (a tool in Chrome you can access by right-clicking on that page and clicking 'Inspect'). Before submitting I realized my page was just completely empty. A white page. Which is what my instructors are expecting but I didn't want to settle for that. I had a few extra hours last night and spent that time 'd...

Bringing it All Together

Image
Coding is all a logic game. I've discovered it's using tools in conjunction to produce a result. Brain teaser doesn't even begin to describe it! My head feels like a swarm of bees caught in tiny net trying to solve this one! https://github.com/victoriarainc/blackjack If you take a look at the link you'll see a program (well, a bunch of notes that resemble some bizarre string of consciousness) that calculates the total of your digital hand in the game of Blackjack. I've never thought so critically about the value of a card before! Throwing in the curveball of Ace being one of two values depending on your cards really throws me for a loop. Taking it one step at a time is key though and something I definitely need to improve on. This bit of JavaScript isn't quite as crafty as some other very visual aspects but it is still super addictive! In the same way solving a word search is though. I'm completely infuriated until I finally find the word I haven...