Flatiron Blogger Magazine

The Power of Object Orientation by on 01/20/2017
Prime Primer by on 02/16/2017
Yelp(¯\_(ツ)_/¯) API by on 04/20/2017
Open application program interfaces “APIs” are powerful databases for developers to access to build applications that incorporate third party information. APIs are typically mutually beneficial as they benefit developers with an useful source of data but also promote usage and visibility into content created by the API owner. In my series of blog posts, I will aim to provide an overview of different popular APIs that could be integrated into applications. This blog post will tackle the Yelp API.What is Yelp?https://medium.com/media/4218233fe9171998fb4ff0ea82915d74/hrefYelp is a crowd-sourced local business review and social networking platform. Individuals use Yelp as a way to discover new restaurants in specific locations, use reviews, ratings, picture, etc. to determine if they want to visit a restaurant, and review restaurants they have visited. Yelp, overtime, has expanded its services to include a reservation system (competing against Opentable) and a food delivery service, Eat24 (competing against Seamless — seems like a lost cause…). As of the end of 2016, Yelp has 135 million monthly visitors and 95 million reviews.Yelp API — Brief IntroductionThe Yelp API gives developers access to all of the 50 million businesses hosted on the Yelp application. Using the API, users can:Find up to 40 best results for a geographically-oriented searchSort through results using parameters such as ratings, distance, or dollar signsLimit results to specific cuisines or those that are offering a “Yelp Deal” (discounted pricing)Identify and display whether a business has been claimed on Yelp.comConnecting to the Yelp APIAs with all APIs, the first step to accessing all the information Yelp provides is to authenticate users and connect to the API. To do so, a user has to initially set up their application on the Yelp database by submitting information such as “App Name”, “Industry”, “Contact E-mail”, and “Description”.Sample form to set up a Yelp API applicationOnce a new application is created, Yelp provides users with an App ID and App secret code which will both be used to establish a connection to the API.I have deleted the App so don’t bother trying to use my App Secret Code ;)Luckily, Yelp provides a very straightforward template code to apply the App ID and App Secret to establish the connection to the Yelp API. Simply, insert the App ID in the CLIENT_ID Class Constant and App Secret in the CLIENT_SECRET Class Constant and the program will create a bearer token which will be used to access the Yelp API for future search requests made through the user’s application. A couple of things to keep in mind:The JSON gem, HTTP gem, and the OptionParse gem are required to run the connection program. Be sure to install all three gems before trying to establish a connectionThe bearer token is active for 180 days. After 180 days, a user has to create a new bearer tokenYelp limits searches to 40 results. An easy workaround is to call a search on a set of parameters multiple times and collect results in a hash. Be sure not to add any duplicate resultsYelp template codeSearching with the Yelp APIAfter setting up the connection, the next step is to prompt a search. Each search takes in two parameters: a location (can a be a zipcode, address, or city) and a term (can be a cuisine, type of food, and even something other than a restaurant term like hats or tires!). Using the search parameters, the Yelp API outputs an array of 40 restaurant hashes. Using loops, users can iterate over hashes to extract key information that they require. Each hash has the following information:Business IDBusiness NameImage URLYelp Website URLReview CountCategories (Cuisine, Food Type)RatingLocationPricePhone NumberDistance from inputted locationConclusionThe Yelp API is a powerful tool that can allow users to search for specific restaurants in their location to be able to make decisions, extract ratings information, map out details of restaurants in specific regions, and many other various use cases. The API itself is quite simple to connect and the functionality is straightforward enough to be able iterate through results. Hopefully, this was a helpful tutorial and please ask any questions in the comment section. Next time, I will be covering the Twitter API!
Comparing Ruby Array Methods by on 03/31/2017
When I first learned about Ruby iterators, I was in heaven. There were so many cool methods I could use to iterate over my arrays! I spent a lot of time (and still do) looking at the Ruby documentation for array methods. (Find the documentation here: https://ruby-doc.org/core-2.4.1/Array.html)It didn’t take long to notice that a lot of the methods seemed to do the same thing. I found myself choosing one method over the other for arbitrary reasons such as “keep_if sounds cooler than select. I’ll use keep_if!” But… those two methods aren’t actually the same.This post compares several Ruby array methods and shows how they are, or aren’t, the same. To make things more fun, all of my examples include my favorite food: cheese!SELECT versus KEEP_IF versus SELECT!I’ve got lots of cheeses in my fridge. Here’s my current cheese stash:cheeses = ["muenster", "extra sharp cheddar", "white cheddar", "pepper jack", "beer cheddar"]I’m craving a monster grilled cheese sandwich, so I think I’ll make one with all of my cheddar cheeses.SelectI can use select to get, or select, all of my cheddar cheeses.cheeses.select { |cheese| cheese.include?("cheddar") }# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]As you can see, select has returned an array with all of the cheeses that include “cheddar” (aka all of the elements for which the block returns true). Let’s take a look at the original cheeses array:# => ["muenster", "extra sharp cheddar", "white cheddar", "pepper jack", "beer cheddar"]My cheese stash is still intact. That’s because select creates and returns a new array, leaving the original array unchanged.Keep_ifThis method is very similar to select, because you guessed it, the method will keep the elements if they meet some condition.cheeses.keep_if { |cheese| cheese.include?("cheddar") }# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]Awesome! I’ve found another method that will return all of my cheddar cheeses. Let’s take a look at the original cheeses array:# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]Holy Swiss, Batman! What happened to our cheeses array? Unlike select, keep_if is actually manipulating and returning our original array (aka this method deletes all of the elements in the array for which the block returns false).Select!With our current example, select! will behave just like keep_if. As you can see below, it will manipulate and return our original cheeses array.cheeses.select! { |cheese| cheese.include?("cheddar") }# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]# Here is our original cheeses array:# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]With another example, though, we’ll see that keep_if and select! aren’t exactly alike.A few days go by and I want another cheddar-y grilled cheese. Unbeknownst to me, my husband has eaten all of the muenster and pepper jack, so here is what my cheese stash looks like now:cheeses = ["extra sharp cheddar", "white cheddar", "beer cheddar"]I’ll use keep_if and select! again to get all of my cheddars.cheeses.keep_if { |cheese| cheese.include?("cheddar") }# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]The cheeses array:# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]---------------------------------------------------------------cheeses.select! { |cheese| cheese.include?("cheddar") }# => nilThe cheeses array:# => ["extra sharp cheddar", "white cheddar", "beer cheddar"]Hmm… that’s weird. select! returned nil. That’s the difference between keep_if and select!. If no changes are made to the array (aka if every element returns true and nothing is deleted), select! will return nil.REJECT versus DELETE_IF versus REJECT!These methods kind of do the opposite of select / keep_if / select!. And it’s a good thing these methods exist, because I’ve got some parmesan cheese that’s stinking up my kitchen and has got to go. Here’s my current cheese stash:cheeses = ["goat cheese", "mozzarella", "parmesan", "feta"]RejectFirst, I’ll use reject to get rid of my parmesan:cheeses.reject { |cheese| cheese == "parmesan" }# => ["goat cheese", "mozzarella", "feta"]# Our original cheeses array:# => ["goat cheese", "mozzarella", "parmesan", "feta"]Woo-hoo! My stinky parmesan got rejected and my original cheeses array is intact (aka a new array was created and returned containing the items for which the given block was not true [aka we rejected the items when the block returned true]).Delete_ifNow I’ll get rid of my parmesan using delete_if:cheeses.delete_if { |cheese| cheese == "parmesan" }# => ["goat cheese", "mozzarella", "feta"]Our original cheeses array:# => ["goat cheese", "mozzarella", "feta"]You guessed it! delete_if manipulated and returned my original cheeses array (aka the method deletes every element for which the block evaluates to true).Reject!The same will happen with reject!:cheeses.reject! { |cheese| cheese == "parmesan" }# => ["goat cheese", "mozzarella", "feta"]Our original cheeses array:# => ["goat cheese", "mozzarella", "feta"]After I complained about the stinky parmesan, my husband was nice and threw it away. My current cheese stash no longer contains parmesan:cheeses = ["goat cheese", "mozzarella", "feta"]Can you guess what will happen if I now use delete_if and reject! to try and get rid of the parmesan (aka no changes will be made to the array)? I bet you can!cheeses.delete_if { |cheese| cheese == "parmesan" }# => ["goat cheese", "mozzarella", "feta"]Our original cheeses array:# => ["goat cheese", "mozzarella", "feta"]----------------------------------------------------cheeses.reject! { |cheese| cheese == "parmesan" }# => nilOur original cheeses array:# => ["goat cheese", "mozzarella", "feta"]Just like select!, reject! will return nil if no changes were made to the array.MAP versus COLLECTBy now you can probably tell how much I love cheese. I love cheese so much that I need to shout it out. And how do you shout through a screen? LIKE THIS. Here’s my current cheese stash:cheeses = ["blue cheese", "baby swiss", "ricotta", "sharp cheddar"]MapI’ll use map to upcase all of my cheeses and therefore declare my love for cheese:cheeses.map { |cheese| cheese.upcase }# => ["BLUE CHEESE", "BABY SWISS", "RICOTTA", "SHARP CHEDDAR"]Let’s check out what my original cheeses array looks like:# => ["blue cheese", "baby swiss", "ricotta", "sharp cheddar"]As you can see, map returned an array of shouts, but it left my original cheeses array intact (aka it created a new array containing the values returned by the block).CollectBefore writing this blog post, I was pretty sure that map and collect were the same. And after doing research for this post, I’m 99% sure that map and collect are the same. The Ruby documentation doesn’t explicitly say that one method is an alias for the other, but I wasn’t able to find anything that indicated otherwise.So… let me use collect to again declare my love for cheese!cheeses.collect { |cheese| cheese.upcase }# => ["BLUE CHEESE", "BABY SWISS", "RICOTTA", "SHARP CHEDDAR"]And as expected the original cheeses array remains intact:# => ["blue cheese", "baby swiss", "ricotta", "sharp cheddar"]IN CONCLUSIONThanks for staying with me during this cheesy post. The main takeaway from all of this is to be mindful of what your method is returning and what it is doing to your original array. The more I learn about coding, the more I realize that you need to be careful with destructive methods (such as keep_if, select!, delete_if, and reject!). Before using one of these destructive methods, make sure you really want to change your original array.Cheese ya later!
Add Style To Your Rails App With Materialize by on 04/21/2017
Agile Development in the Software World by on 04/20/2017
https://medium.com/media/7c58bf57b627e1e4548ce0cdf0395363/hrefNot Quite…At its core, Agile Development is a set of principles used within software development environments wherein team collaboration and continuous delivery are required solutionsLet’s first think with the mind of a software developer. As developers, we are taught to break down giant problems into smaller, easy-to-solve “baby-problems”. How does this work in a large-scale work environment when all members of the company share their own inputs? Well in comes Agile Development.Gimme some history…In 2001, seventeen individuals from the software world met on a ski trip. And like any other vacation with friends, they naturally complained about their jobs and the issues that keep them from quickly launching even the simplest of prototypes. From this “meeting of the minds” / ski vaca came A Manifesto for Agile Software Development.So why is this important?As a software engineer, it is essential to understanding even the general idea of Agile development. First, it is increasingly popular in company environments, especially those that are tech-based or engineering-based. It helps teams produce effect results that are scalable, lean and adaptable. As students at Flatiron School, we have actually gained first-hand experience in the agile process. We begin each morning with small group stand-ups (more on that later). We also have been taught to create immediate-working prototypes using the “minimum viable product” process.Through this idea of Minimum Viable Product, we have learned that it is more effective to have a small set of code working immediately (like a little skateboard) rather than jumping right into the elements of a car, only to realize that the car, as a whole, is fundamentally flawed. Instead the skateboard provides the same fundamental elements as a car, just without some pieces. From a skateboard, we can iterate and build on to eventually reach a beautiful car that operates (almost) flawlessly.What exactly is Agile, though?For brevity, the manifesto stresses 4 core values to maintaining an effective agile method:This looks cultish. I guess it is. Yay software engineering cults!Let’s break these 4 values down, for a more applicable understanding to our process.The Agile method treasures individuals and interactions versus processes and tools. While organization and motivation are important, agile believes that pair-programming and encouraged interaction (like co-location) produces a more effective tool with less minor errors and a leaner result.It can also be understood, that adaptability to change rather than following a plan produces a product that is scalable and and continually be developed.Working software is as simple as saying, prototyping. It is much easier to use a tangible product and test its effectiveness rather than reading about it on paper and assuming that it will function correctly.Finally, the agile method sees customer collaboration as a way to make continuous delivery more effective. In order to continually create a prototype that is scalable, customer involvement is the most important factor. Engineering teams cannot refactor or redesign without constant involvement and feedback from the client.the best drawing of the agile process that I could find. Thanks ThoughtWorks!Okay, what else?https://medium.com/media/5e1b1b4a3c7502c95133f6446febfadf/hrefThere are many versions of the Agile method. Agile is just that a method to organizing your team’s workspace. There are several variations of Agile:DSDM — Dynamic Systems Development method. The OG of Agile MethodologyScrum — The key difference here is that during their product development stage, clients can change their mind about what they want and need (referred to as “requirements volatility”). This also tends to be the default methodology.XP — Extreme programming. Advocates frequent releases in a short-term. “Release early, release often” is usually their motto.Lean software development — Adapted from the Toyota Production System. This process believes that anything that does not add value to the client is considered wasteKanbanAdaptive software development (ASD)Agile modelingAgile Unified Process (AUP)Crystal Clear methodsDisciplined agile deliveryFeature-driven development (FDD)Rapid application development (RAD)ScrumbanWhat does an Agile Office “look like”?When you scan an office (or even a school like Flatiron) you see a lot of main Agile-like themes.First, teams are co-located in an open area. This is to clearly encourage the individuals and interactions facet of Agile core values. This also allows teams of developers to work together in an open and honest environment, with no office doors to hide behind.https://medium.com/media/344ac7d7f362f625508e80de67da92cc/hrefTest cases are also written before programming begins. At Flatiron we follow this same ideal with the “test-driven development approach”. So don’t worry, flatiron-ers! We will be making our own SPECS in our future jobs! Yay!Stand-ups are also a way of life and a start to every day in an Agile office. This gives ample opportunity for teams to stay on track with what piece each person is working on, and to see additional help if they are encountering a problem. Standups are also 15 minutes max and usually never mandatory, but always strongly encouraged.Finally the process consists of one-to-four week iterations called “sprints”. For my Flatiron pals, this is reflective of our modules. During these sprints, each iteration produces working code. The four weeks usually work as so:Planning the functionality that will be built in the current iteration. This is usually directed with the entire development team using things called “user stories” (high-level descriptions of business tasks that the application needs to address)Screen mock-ups and test casesCoding and integration testingDemo of working codeA “retrospective” at the end of the four weeks to discuss successes and failures during iteration and what could have been done differently. For my Flatiron-ers, think “feelings Friday” with more constructive feedback.https://medium.com/media/9bd203f69e30b6a0793d7c79860f19e5/href
First Test Post and Launch by on 04/11/2017
A start of a blog site on my github repo, hopefully I can keep it going even semi-sporadically past my class time. Neat thing about it - powered by Jekyll and I can use Markdown to author my posts. It actually is a lot easier than I thought it was going to be.
The Speed of Ruby by on 04/19/2017
Ruby is a diverse programming language that allows for many different sytles of programming, that doesn't mean that one style isn't the obvious choice. Object orientation is the name of the game when it comes to Ruby. The ability to encapsulate data into both public and private methods is vital to the idea behind Ruby. It does take that opiniated stance with some drawbacks. The main one that I am both concerned and writing about is speed.
Market Design for Software Engineers by on 04/15/2017
Why it matters and a brief introduction to auction theory“The limits of my language means the limits of my world.”- Ludwig WittgensteinIt’s not all about the codeLudwig Wittgenstein could not have been a great philosopher with limited language, but it was not his language that made him great. New Coke outperformed Classic Coke in taste tests, but it was still an abject failure. Google’s didn’t vanquish early search engines because of their code, but with the ideas that were expressed in code. The ability to express an idea well is a prerequisite for success, but it is the idea itself that determines success.Markets are everywhere and their rules are now written in codeIn the latter half of the 20th century, code automated processes. Lotus 1–2–3 made it easier for AAA Widgets to do their books, but it didn’t make it easier for them to find and connect with customers. They still had to bring their widgets to a physical location where they could find customers and customers could find them.Obligatory blog post gifA textbook example of how the world operated before smartphones and the internet is the 1980’s commodity trading classic, Trading Places. After feeding the Dukes false insider information, Dan Aykroyd and Eddie Murphy had to physically travel to a futures exchange in New York to profit from the Duke’s attempt to corner the frozen orange juice futures market with a naked short-selling trading strategy. Today, Dan and Eddie would have placed theirs orders from their phones to one of many electronic futures exchanges that only exists in some AWS server as the waited to board a the flight to their new tropical seaside home from Philadelphia .The internet removed the need to for markets to physically connect participants, leading to an explosion of new market designs. AirBnB created a new market for excess capacity, Facebook redefined the market for social interactions and Google redefined the market for information. For every AirBnB, Google or Facebook there have been thousands of failed attempts. Some may have failed because of poor code, but most failed due to bad market design.The broken market for information“The Internet stinks… It’s like walking into a public library and seeing all the books laying all over the floor”- Jamie Dimon (1998).The core use case for search engines is to match users with information. A user passes a string of search words (their preferences) to a search engine which runs an algorithm to determine which websites are most relevant or best match the user’s preferences.Early search engines determined relevance by how many times a word appeared on a website. Websites, as it turns out, have a large incentive to increase their search relevance. It is the same incentive which led our widget company to name themselves AAA Widget (yellow pages). Website were easily able to increase their relevance by increasing the number of times popular search words appeared on their site.When 1998 Jamie Dimon typed “books” into one of the early search engines clicking on one of his top results were likely to result in a barrage of pop-ads.Google corrected this flaw with a new relevance algorithm called PageRank. PageRank determines a webpage’s relevance by how many times other websites link to that webpage. PageRank is harder for websites to manipulate relevance; leading to better search results. Google was also able to monetize a websites incentive to increase relevance by selling sponsored search results.What is a marketAny process where something scarce is allocated can be thought of as a market and can be lumped into one of two broad categorizes: clearing price markets and matching markets. Clearing price markets use a store of value (money, reputation, gaming life points, etc) to determine who gets the scarce resource and matching markets do not. Participants in matching markets can still pay for the scarce resource, but the price alone does not determine who get what. The Flatiron School’s admission process is a matching market. Students pay to attend, but Flatiron does not raise the price of admission until demand equals supply to determine who gets the limited space in each cohort.In clearing price markets, the entire process is often called an auction and the process of determining which participant gets what is an auction mechanism or auction method. In matching markets, the entire process is generally considered part of the same algorithm. In reality, the naming conventions carry no special meanings and are used interchangeably depending on context.Auction typesAn Auction can be a call auction or a continuous auction. A call auction aggregates preferences and runs the auction method at a predetermined time. A continuous auction attempts to match preferences as they arrive.An auctions can be an open auction or a blind auction. Preferences are hidden for the participants in a blind auction and can be seen by all in an open auction.An auctions can be a single-sided auction or a double-sided auction. A single-sided auction is one to many and a double-sided is many to many.The movement of prices in a singled-sided auction can either be ascending or descending. Ascending price auctions are called an English auction and descending price auction are called a Dutch auction. English auctions are primarily used for singled-side open auctions and are what most people associate with the term auction. Dutch auctions, however, are far more common. The U.S. Treasury uses a Dutch auction to sell new treasury securities.Single-sided sealed-bid auctions are also widely used and the two most common types are the first-price sealed-bid auction and the Vickrey auction. In a first-price sealed-bid auction, the bidder with the highest bid wins the auction paying his or her bid price. In a Vickrey auction, the bidder with the highest price wins the auction, but only pays the price of the second highest bid.The Vickrey auctionA Vickrey auction used to be called just a second-price sealed-bid auction and has been around since at least 1797. In 1961, William Vickrey, a Columbia University professor, was the first to prove mathematically that the auction was incentive compatible or that participants were incentivized to reveal their true preferences. This is important because an auction is most efficient when it allocates the thing are things being auctioned to the participant or participants who value them the most. That can only happen when participants are truthful. Why would a participant not tell the truth, when a market’s design incentives them to lie.In a first-price sealed-bid auction, the winner pays a penalty . The penalty is the difference between their bid and the second highest bid. This is called the winner’s curse. The less information in a market, the greater the risk of overpaying and the stronger the incentive for participants to lower bids. The strategic lowering of bids in a first price auction is known as bid shading. A second-price sealed-bid auction eliminates the winner’s curse and the incentivize to bid shade. This may seem counterintuitive, but sellers benefit most from a second-price sealed-bid auction. Studies have shown that not only does the lack of bid shading make up for selling at the second highest bid, but bidders will actually bid above their private values as they know they will pay a lower price if the win. Google uses a generalized second-price auction for their adWord keyword auction.Understanding participant incentives and designing a markets structure around those incentives is key to good market design. Google is the most visible and coder friend example of good market design, but there are some more interest concepts and examples that I will introduce in future blogs.Now for some codeTo further demonstrate the relative important of the code in market design, I will demonstrate that even a monkey randomly hitting keys on a computer keys can code auctions (I am the monkey). Here (https://goo.gl/aYNeNZ) is an auction simulator that will hopefully evolve to able to allow the user to test new market design ideas. Currently, it only support running simple blind single side auctions.
3/29/2017Barrier To Entry- The term “Barrier(s) To Entry” as defined by wikipedia “In theories of competition in economics, a barrier to entry, or an economic barrier to entry, is a cost that must be incurred by a new entrant into a market that incumbents do not have or have not had to incur.”To expand on this phrase I believe that “Barrier to Entry” refers to anything that might prevent you to from doing what you desire to do.  I got a great piece of advice from a taxi fare I had while I was cab driver at age 23 on Nantucket island. After revealing to very successful middle aged man that I had decided to drop out of school to pursue a life of travel and adventure while living in luxury resorts around the united states. He says “Don’t worry about that, you are doing exactly what you are supposed to be doing.  Also you need to know this, when it comes to personal growth in life.  It is never too late to go back to school or learn anything for that matter!”So, 12 years later when presented the idea that it was a good career decision to shift and learn to code, the outcome seemed to good to be true.  My cousin tells me “Take this 3-4 month course and you will gain the tools to land yourself a job that pays twice as much as you are making now.”  This sounded crazy to me and I had no idea where to begin.  I guess the first thing I would need is a computer.  Now if you are anything like me, computers always could process much more than I knew what to do with.  I was only capable of base level use, where I knew how to log on the internet check my email and keep up with all my online profiles.  I could navigate and check photos, organize song libraries and write a word document.  To say the least, I felt illiterate when it came to anything more technical than simple use. So I ask “Do you really think it is possible for someone who has no prior knowledge of technology, to start and pursue this career in the industry on an accelerated timeline?”  My cousin’s response was “Yes, it is totally possible and the only advice I have to give is. Don’t get discouraged!”  So now I am definitely skeptical and here comes my “Barrier to Entry”.  First of all how do I get a computer and how do I afford to get into one of these so called “Bootcamps”.  It was 4 months after that initial conversation that I started making any real progress.  Through a turn of events I ended up leaving Brooklyn, NY to spend a winter with my mom and brother in Tarpon Springs, FL.  When I arrived I started looking for jobs in any field I was qualified in or capable of learning.  The job market didn’t offer anything promising, and after attending a job fair.  I realized none of the jobs that were being offered actually appealed to me.  Fortunately, my brother had a computer at home and with time on my hands I looked into free resources online.  My first experience with coding started at  CodeAcademy.  This website offers free entry level concepts to over 20 different coding languages with tutorials on how to start learning to code.  For $19.99/month you can get more content, as well as help from online instructors and extras like full projects and quizzes to assist your coding journey.  When I started in December of 2016 with codeacademy I tried a few different languages. I practiced in “HTML & CSS”, “Ruby & Ruby on Rails”, “JavaScript’, “Python” and “Java”.  From there it was time to check online for schools and bootcamps, when I found the site Switchup.  The site has a great starting point to look at some of the more well known schools out there.  I came across a school called App Academy.  The most appealing aspect of this school was the model they have, that you don’t pay anything until you have completed the course and gotten a job.  They claim that you need no prior coding experience.  I found that while that might be true, the technical coding challenge they have at the beginning of the application process to be very intimidating.  I thought now with some knowledge I would be able to solve some of their most basic coding challenges. I couldn’t do them without looking at the solutions and felt unprepared to take the technical Interview.  At this point I was having to share time on the computer with my family and knew if I wanted to keep moving I would need my own machine.  I know that you can do work on other computers but from the people I was talking to.  They said I should invest in a mac.  While the price might be slightly higher, the ability to use this machine as a tool seems second to none!  How the hell was I going to afford a MacBook?  There are plenty of options out there.  I searched craigslist - https://newyork.craigslist.org/search/sss?query=macbook&sort=rel groupon- https://www.groupon.com/browse/new-york?lat=40.7561&lng=-73.987&address=New+York+City&query=macbook&locale=en_USand eventually ended up going through apple and buying a refurbished MacBook Air with the apple care plan.  If this was going to be my future I wanted to make sure I had the customer care to get my machine fixed when I needed it fixed.  There are cheaper options available but mine totaled $1,369.00 and was not something I could afford.  Apple offers 18 month 0% financing and at the moment I pay $20 a month for the tool.  I don’t recommend putting yourself in debt for any reason, but I know that to accomplish what I want to, this investment was absolutely necessary.  I thought that if I was going to get into app academy I would need to find a way to learn more to get through that technical interview.  From the magic of user directed adds on the internet, I saw an add for a free online bootcamp prep course offered through “// Flatiron School”.  Which offers 75+ hours of coursework to start you on your coding journey,  You can find more on this at  https://flatironschool.com/.  I found the learn IDE they created to work through curated test driven labs to be the most useful tool I had come across in my month long coding career.  Moving through their online program I was contacted and asked if I wanted more information about applying to their bootcamp.  After a short conversation with an admissions agent, I was urged to apply. I knew the program was selective about applicants so I had to make sure I stood out.  In the “tell us more about you section” I wrote a lengthy response about my passion and newly found desire to enter the coding world.   I also spent every extra second I had working through the online bootcamp prep work course. I received an invite for an interview over “skype”.  In the interview I made it a point to state how confident I was in my ability to learn the content even though I had no background in the subject.  I also knew that I wanted to do this right now!  I made sure they were aware of this as well.  The interview went well and was passed ahead to the technical portion. Here again being a beginner,  I was afraid this is where my inexperience would hold me back.  I made sure to talk a lot and work through all the problems at hand.  The technical interview went okay but I wasn’t sure if I would get into the program.  A few days later I was invited to join the Flatiron School and the class came at price tag of $15,000.  “Oh boy” I was thinking, how am I going to afford this now too?!  Well, the Flatiron School lets you apply for scholarships and also they route you to lenders who offer loans to students to further their education. I found out later that there are a variety of programs offered by the government for tech hires that are totally free. You can see a different courses offered in NYC at http://www.techtalentpipeline.nyc/.  In fact there are a few hosted by Flatiron School that are sponsored by the government.  I highly recommend starting there to see if they have that you may qualify for.  The immersive web development and software engineering course is 15 weeks long and I am currently in my third week.  The course moves quick and new material is presented every day.  While the majority of students feel behind, you are surrounded by people who are in the same boat as you.  No matter what you are struggling with you can find multiple resources and the support you need.  There are people with unique backgrounds that offer so much perspective on any subject matter. Class is scheduled from 9am-6pm Monday through Friday and it is rare that I spend less than 10 hours in a given day at school.  That doesn’t even account for the time spent on weekends to cover things you weren’t able to finish during the week.  Don’t be surprised to see students passed out in bean bags before they leave for the day.  There is a blog from software developer  Peter Adeney in  Longmont Colorado, who retired at the age of 30.  Here is a quote from one of his blog posts - Get Rich With: Good Old-Fashioned Hard Work!“You too can have the lifestyle of your dreams. And to get it, you will need to do an absolute shitload of insanely intense, ball-busting work. And here’s the best part: the insane work will bring you just as much happiness as the leisure time!”(Here is a link to that article and more on his blog Mr. Money Mustache)I am overworked and super tired but this roller coaster of feeling like I don’t know anything to moments of euphoric breakthroughs are more than exhilarating and an amazing ride!  If you think it will get easier that isn’t the case if you are truly looking to challenge yourself.  Every time you grasp something there is a bigger concept for you to adopt and a new technology to learn.It is really exciting being in an industry that is growing at such a rapid pace there is not enough people to keep up with the demand for great jobs that are available!  I look forward to posting a future blog and referring to this one where the light at the end of the tunnel seemed so far away.  There is a quiet confidence inside that knows this is the place to be and this is what I need to be learning. I would like to finish with another quote from MMM and his blog post from above.“Every single second of hard work you perform in your life, will come back and benefit you many times over for the rest of your life – in often unexpected ways.”  Blog written by:Charlie Stopek
A session on Sessions by on 04/20/2017
A briefing on Web Cookies by on 04/19/2017
More functional and less tasty than the real ones.Web cookies: misunderstood by laypeople and abused by marketing corporations for almost the entirety of their existence. Are they viruses? Are they spy things? Do they cart off our information to the bad guys without our knowledge?A cookie is just a text file.When you navigate to a website, you make a request from your browser to the server for its data. The server sends you the data and includes with it a small file, comprised of a string of text, that it enters into your browser’s memory. Then when you visit other pages on the website, the server recognizes you as the same user from the first page.HistoryCookies were invented in 1994 by a cool guy named Lou Montulli, a software engineer of 24 who worked at Netscape at the time.Baker of the cookiesHe thought of cookies as a solution to the problem of online shopping. At the time, there was no way to “remember” a user as they flitted between the pages of your website, thereby making it difficult to institute the concept of a “shopping cart.” In his own words from his blog post on the reasoning behind Web cookies:Without a session, each time a user clicked to move to a different page they would become just another random user with no way to associate them with an action they had done just moments ago. This is a bit like talking to someone with Alzheimer disease. Each interaction would result in having to introduce yourself again, and again, and again.Cookies provided a way for temporary memory to “improve user experience.”I am happy with thisSimple cookie analogies:Although I didn’t invent these, two analogies for cookies helped me visualize on a basic level their form and function.1. The fortune cookieFortune cookies are embedded with messages. The cookie holds that can be text that can be read. In this scenario, the server saves a fortune cookie on your browser that holds information about you as a user, which it can read to tailor its website to you. (Don’t think about this one too hard because it breaks down pretty quickly.)2. The coat checkThis would be an awful coat check.A coat check gives you a token to identify you as a user. When you come back to it, they can serve you better because they have a way of identifying you. (To be clear, unlike tokens which have no intrinsic value and are simply identifiers, Web cookies have your information saved directly on them. The coat check analogy comes from the Wiki article on Magic Cookies, which are different from Web cookies and act more like the tokens.)Types of CookiesSessionSession cookies exist only when you’re logged in and your browser remains open. They’re usually deleted by the browser when you close the browser.PersistentThese do not die when you close the browser or log out, but remain for a length of time or until a specific date. They’re what happen when you click “keep me logged in.”ZombieAfter being deleted, these cookies come back to life! That’s because they can be saved in locations outside of your browser. There are both legit and sneaky reasons to use this type of cookie.Third-PartyThe Guardian’s animation helps visualize 3rd party cookies, even though they show strong bias toward advertisers:https://medium.com/media/b2d661ccd9aa4c38a50b98e9f16fb41c/hrefCookies can store different types of data in its tasty little chips3rd party cookies come from references on that website to other websites — advertisements are a good example. They come from a domain that is different from the website you’re visiting. When cookies are combined with references to these outside sites, they make you traceable across multiple websites. This can lead to targeted advertising and your information being much more accessible than you might realize.Lou explains why he made the decision to keep 3rd party cookies in two of his blogs (here and here).The answer is pretty simple:1. The evil you know is better than the one you don’t.2. This is probably a race we can’t win.The debate is bigger than this blog post, so I’ll link to resources to learn more at the end.GhosteryA plugin I found while researching cookies is Ghostery, which shows you in real-time the trackers on any http or https site you’re visiting. You also have the option to block those trackers that you don’t trust with your information.Meryl’s Ghostery:What about the name?There’s so much to explore about cookies that several websites have devoted themselves entirely to it, like WhatAreCookies.com and the aptly named CookieCentral.com. But I’d like to close this brief introduction with a clarification on the name.The Magic CookieLou heard the term “Magic Cookie” from an operating systems courses in college to describe an opaque piece of data held by an intermediary. The term fit his use and he liked the way it sounded so it stuck.The Cookie Bear TheorySpoiler: the Internet is FULL OF LIES. Although the real answer is definitely a Google away, several websites and even an e-book site a totally different reason for the name. Here it is from Rebecca Herold’s “The Privacy Papers”:…early hackers got their kicks from Andy Williams’ TV variety show. A “cookie bear” sketch was often performed where a guy in a bear suit tried all kinds of tricks to get a cookie from Williams, and Williams would always end the sketch while screaming, “No cookies! Not, now, not ever … NEVER!”Well, this was the first reason I stumbled upon in my search so I naively looked up this cookie bear sketch, and my nightmares will never be the same.ResourcesLou Montulli’s BlogWhat Are CookiesCookie CentralWikipedia on HTTP cookiesThe Privacy Papers by Rebecca HeroldCookies for Everyone! University of New BrunswickWikipedia on Magic CookiesWeb Cookies Explained: The Guardian AnimationThe Andy Williams Cookie Bear SketchGiving Web a Memory Cost its Users PrivacyNow that I’ve searched for him Cookie Bear will follow my cookie crumbs all over the World Wide Web.
The Local Git Environment by on 03/28/2017
Don’t Panic! It’s Confusing for Everyone Git is a powerful VCS (Version Control System) that is the industry standard for tracking any and all of the changes that take place on a project. It’s utility comes from it’s ability to allow team leaders to conveniently manage multiple members contributions and incorporate them into a finished project. Unfortunately, it seems to be designed from the point of view of those team leaders and things can get pretty confusing if you’re one of the people doing the contributing.
Rails Sessions, Flash, and Cookies by on 04/18/2017
Cookies in Rails Cookies are a developers tool to take stateless HTTP requests and give them state. In other words, they allow us differentiate between a GET request from one browser and a GET request from another. They let us do this by telling each browser to send some data within the body of their request in the form of a params associative array (aka a hash in ruby.) We can then use this data, which we set at some point after the user visits our site (e.g. on login), to figure out which user is which.
Hashtag #hashmaps by on 04/19/2017
Ruby Closures and Procs by on 04/19/2017
After some failed attempts at building something cool in javascript and realizing that I’m not quite up to snuff on website design yet to be launching into more interactive projects, I’ve decided to tackle something else more related to the current Ruby work we’re doing at Flatiron and focus on a specific subject: closures in Ruby!
Before I get into my attempt to do this (it’s actually pretty complicated and is going to take me awhile, hence the part 1), I’m going to share a little bit about why I would even want to make a VPN with a Raspberry Pi instead of just buying access to a VPN via a VPN service/app.especially with the way I’ve decided to do thisWhen I first got into coding in college it was because friends of mine were hacking hardware and making it do things they weren’t originally intended to do. Things like having toys for babies that makes cute sounds all of a sudden make broken, distorted sounds by circuit bending, distorting video with code, or hacking Nintendos to grab an 8-bit sound palette to construct their own music from.I couldn’t do any of this stuff but I thought it was awesome. I attended a circuit bending workshop/festival called Bent Festival and started to play around with an Arduino during the workshops. I was doing super basic stuff, like making an L.E.D blink. In college I took a Processing class, a Max/MSP/Jitter class and a physical computing class before I realized art school wasn’t the best place to learn how to code.When I started working at Adafruit, an open-source hardware company, we had just started carrying the Raspberry Pi. When we stocked them they would sell out the day after we made them available for purchase. Needless to say, I was intrigued by them! But…I was busy with making thousands of starter kits and hated my job so I actually never explored using the Raspberry Pi, despite getting one and everything I needed to play around with it. All the required tools for doing basic stuff with a Pi just sat in a corner in my room collecting dust.Since I am where I am (Flatiron School), learning how to actually code, it seems there is no better time than now to wipe off the dust that’s collected on my box of DIY electronics and explore what I can do with my Pi.While buying access to a VPN is easier and probably has a lot of benefits (less stress being one of them), you can’t trust every service and doing it myself would just feel really good (because going through all that stress makes anything feel good when it finally works).Okay! That’s done. Enough about me and more about the purpose of the actual VPN connection.VPNs…what are they, why should you care:A VPN is a Virtual Private Network. It provides a secure and private connection between computer networks over an existing public network (the Internet).Therefore, when you’re doing normal stuff on the web or weird stuff you don’t want anyone to know about, some rando/the gov can’t spy on your internet activity.especially if you use a VPN!Why would you want to have a VPN? Some examples are:If you’re a business that has private info that you want to share with only employees at the office/remotely and be sure they’re the ONLY ones able to access that info.You want to torrent the Mummy II without getting a letter telling you that if you do it again you will be in trouble.You’re in China and want to use Twitter/Facebook.You’re at a coffee shop connected to the public wifi to shop online and you don’t want the hacker sitting in the back corner to steal your credit card information as you check out.You want to watch a Netflix show/YouTube video that only UK residents are allowed to watch or avoid other location-restrictions.The government might pass a law where they can sell your browsing history and you’d like to keep that from happening.You want to maximize your privacy when using the “Dark Web” (something like Tor takes care of your anonymity) to buy like, a ton of drugs or hire a hitman to kill your nemesis (please don’t do that).Tools for booting up your Pi & prepping it for it’s new life as your own personal VPN:To create a VPN with a Raspberry Pi you’re going to need a few things. You may already have these things because you’ve used a Pi before, if you do, great! If not they sell most of this stuff at Adafruit:Raspberry PiA case to protect your Raspberry PiMicro SD Card (8 GB or bigger) *Cat5e Cable (router 2 ethernet port)HDMI cable to connect the Pi to a monitorUSB Keyboard/USB MousePower Supply for Pi#gpoy #selfieIn Part II of this blog series, I will attempt to show you how to enable a SSH (Secure Shell) so your browsing will be extra secure and to also create a static IP for your Pi. Shockingly enough, this was another process that took me hours to figure out even with a detailed tutorial and I’m still not sure I did it right.Full disclosure: I am a total n00b and this is literally the first thing I decided to do with my Pi so I am sure I will run into many issues. Hopefully my well documented attempts to do this will give you some insight into the process and you can learn from my mistakes. Maybe you will take pity on me and send me some tips or I can serve as a source of entertainment for you (rude, but understandable).Linked is an SD Card that comes preloaded with NOOBS & Raspbian which is the OS for the Pi. You don’t have to buy one preloaded, but it takes away a lot of extra steps when you’re setting your Pi up, so I recommend it.
WHAT DO YOU MEAN MAC OS IS UNIX-BASED? by on 03/28/2017
WHAT DO YOU MEAN MAC OS IS UNIX-BASED? WHAT IS UNIX? WHERE IS WINDOWS? HOW WERE THESE OS’ WRITTEN? HUH?I decided to write my first blog-post as a budding web developer about something that I have found to be somewhat confusing. Currently, we are learning to code in an object-oriented programming language called ‘Ruby’. What other languages are out there? How does ruby fit in? Let’s explore some of these questions. Hopefully this blog post will serve to help anyone reading with a foundation on these operating systems, daily apps we rely on, and the languages they utilize. **note to reader: As soon as I started to research and google these topics, I realized that I will barely scratch the surface with just one blog post but I’ll do my best.By now, we all know that we are writing code using tools that have been developed by awesome coders. Thanks to these guys, we are able to code, while listening to music through Spotify, keeping an eye on Facebook, and monitoring e-mail; all at the same time! Henceforth, I will refer to these awesome coders as super coders…We often hear the term “unix-based.” What does that mean? How does it apply to us as web developers? Well, let’s go over some fundamentals first…A programming language is a formal computer language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. The programs we are writing are typically considered high level languages and will communicate with the Operating System, which then communicates with the hardware.There are different levels of languages, or tiers. A middle level language such as C is meant to bridge the gap between the low level or machine level language(used for system programming and writing operating systems)and high level languages(such as Java) which are used for application programming.What is an Operating System?An operating system is the most important software that runs on a computer. Its job is to communicate with the hardware and manage applications and memory, whilst creating a good user experience.The layers of a computerOur phones actually operate in a very similar fashion. I am sure you are all very familiar with these logos.The most common cellphone Operating SystemsOperating systems come pre-loaded with computers typically. The most common would be:Microsoft WindowsMac OS XLinuxMicrosoft WindowsMicrosoft created the Windows operating system in the mid 1980s. There have been many different versions of Windows but the most current version is Windows 10, which was released in 2015, Windows 8(2012), Windows 7(2009), and Windows Vista(2007). Windows comes pre-loaded on most new PCs, which helps to make it the most popular operating system in the world. ❤WindowsMac OS XMac OS is a line of operating systems created by Apple. It comes preloaded on all new Macintosh computers, or Macbooks. The most recent versions are known as OS X, which is pronounced O-S Ten. There are various specific versions of this such as El Capitan(2015), Yosemite(2014), Mavericks(2013), Mountain Lion(2012), and Lion(2011). According to StatCounter Global Stats, Mac OS X users actually account for less than 10% of global operating systems in the world — much lower than the percentage of Windows which overs around 80%. One of the reasons is cost. Macs are just too damn expensive!LinuxLinux (pronounced LINN-ux) is a family of open-source operating systems, which means they can be modified and distributed by anyone around the world. This is different from proprietary software like Windows, which can only be modified by the company that owns it. The advantages of Linux are that it is free, and there are many different distributions — or versions — you can choose from.There are HUNDREDS of Operating Systems. We’ll be here for a week straight going over them all.Are you guys still with me?Typically, these operating systems use a graphical user interface also known as a GUI. The purpose of the GUI is to your mouse to click on icons, buttons and menus. Everything on your screen is clearly visible through graphics and text. Each OS has a different feel when it comes to the GUI. If you’ve ever used Windows and Mac OS, you know what I mean. The cool thing is that the basic principles are the same.Things weren’t always this way. Back in the days you would have to do everything through this operating system called MS-DOS!LameThis was the standard for your typical family computer system until…Awesome!Microsoft started to dominate when it came to a user-friendly experience on the home desktop computer.OK, so what is UNIX?Let’s think about how these super-coders were able to implement these cool features and build these massive platforms that can do so many different things for us. How did the super-coders build them? What languages are implemented?By now, we’ve probably read somewhere that our computers are UNIX based, which is good for programming and one of the main reasons were using our MacBooks to code. Think of UNIX as the grand-father of LINUX and Mac OS X. UNIX allows us to utilize its default shell, Bash, which is a powerful command-line prompt. Wait, what’s a shell?A little more complicated than this…A shell is basically a macro-processor that executes commands. Think of it as a complicated command-line application built for us to use. UNIX based systems come with a particularly powerful shell called Bash, also known as bourne-again-shell, which we are familiar with. The reason it is so popular with coders is because it is super stable, has tons of functionality, and years of support and maintenance. The terminal is the actual interface in which you type in the commands.The LanguagesHere are the languages that are used to create these Operating Systems —Windows — The kernel (The kernel is a computer program that is the core of a computer’s operating system, with complete control over everything in the system. It is the first program that gets loaded and handles all the peripherals for the computer such as the keyboard, monitor, printer, and speakers), is written in a language called ‘C’. However, most of its applications are written in C++.iOS and Mac OS — These are written with a combination of C and Objective C.Linux and Unix — These two are mostly written in C.Android OS — This operating system is written on top of Linux, with a chunk of C, a bunch of code in C++, and most of the actual stuff you see on the screen is written in Java.So, we are seeing a pattern. It looks like an operating system can be built on top of another which is built on top of another. We have one usual suspect in all of these cases…C!C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system back in 1972It is a programming language used frequently in the development of an Operating System because it was originally designed for system level and embedded software development(mainly for UNIX)It is widely used for embedded systems like the firmware of your television or the operating system of an airplane, as well as computer operating systems like WindowsIt is the predecessor to more complex programming languages like Java and C#Does not use runtime memory like most modern languages which means that it allows greater speedMost state-of-the-art software have been implemented using C.C++C++ is an extension of the language CA general-purpose object-oriented programming languageOne of the most popular languages primarily utilized with system/application software, drivers, client-server applications and embedded firmwareThe main highlight of C++ is a collection of predefined classes, which are data types that can be instantiated multiple times(sound familiar?)JavaJava is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errorsDeveloped by James Gosling at Sun Microsystems(which is now Oracle)and released in 1995The philosophy behind it is WORA(“write once, run anywhere”) meaning that compiled Java code can run on all platforms that support JavaAs of 2017, one of the most popular programming languages in use with a reported 9 million developersPhew!Anyways, there are operating systems written in languages other than the above. The list includes Haskell, Ada, ASM, C#, and Rust.What I find fascinating about all this is the magnitude of languages and their distinctions/subtleties. These super-coders were able to write code using more code which also uses code. And now, we are using their code, to write more code.Last but not least…I also want to take a look at some other popular languages that we may have heard about or worked with.JavaScriptJavaScript is most commonly used a client side scripting language which means that it is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it’s up to the browser to do something with itIt can be used in other contexts other than a browserJAVA AND JAVASCRIPT ARE NOT THE SAME, however they both descend from C and C++Considered one of the easier languages to start withPopular frameworks include ReactJS, Vue.js, Ember.js, Meteor.jsNode.js up for debate on whether it is considered a framework or a runtime environmentPythonPython is a general purpose programming language created in the late 1980s, and named after Monty Python, that’s used by thousands of people to do things from testing microchips at Intel, to powering Instagram, to building video games with the PyGame libraryHigh-Level programming language for general purpose programming, created by Guido van Rossum and first released in 1991An interpreted language, Python has a design philosophy which emphasizes code readability(notably using whitespace indentation to delimit code blocks rather than curly braces or keywords), and a syntax which allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or JavaRubyRuby is a dynamic, reflective, object-oriented, general-purpose programming language.It was designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan.Learning it is the stepping stone to learning Ruby on Rails(which is a framework for Ruby)*It has pre-written frameworks and libraries like Ruby on Rails and Chef. You can use this pre-written code for your own projects. Why spend time reinventing the wheel when someone else has already done it for you?Excellent first language to learnDemand for Rubyists increasingframework — let’s make this into an example of cutting a sheet of paper into a 5x5in square. If I told you to make 1000 of those sheets, most likely you would not do it one at a time. Instead, you would probably put a stack of sheets together, and use a ‘frame’ that measures 5x5in and cut a bunch of sheets at the same time. Think of what you are doing as a framework — figuring out a way to do something specific many times over with less work, packaged for a specific purpose — another example would be to think of Ruby as the flour to create bread for your sandwich, and Ruby on Rails as the ready-made bread for your sandwich.C#C# pronounced C sharp , was developed by Microsoft within its .NET initiative and is the language used in order to develop Microsoft appsIt is syntactically nearly identical to JavaIf you’re looking to work on Microsoft apps, C# is the way to goSQLStructured Query Language aka SQL is used to communicate with a database.According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.SQL statements are used to perform tasks such as update data on a database, or retrieve data from a databaseSome common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etcAlthough most database systems use SQL, most of them also have their own additional proprietary extensions that are usually only used on their system. However, the standard SQL commands such as “Select”, “Insert”, “Update”, “Delete”, “Create”, and “Drop” can be used to accomplish almost everything that one needs to do with a database.Objective-CObjective-C is the primary programming language you use when writing software for OS X and iOS originally developed in the 1980sIt’s a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. This means that everything that is valid in C is also valid in Objective-CIt adds syntax and semantics to C, that allow for object oriented programming.The language SWIFT is becoming the dominant language in iOS development over Objective-CSWIFTSwift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. for iOS, macOS, watchOS, tvOS, and Linux. Swift is designed to work with Apple’s Cocoa and Cocoa Touch frameworks and the large body of extant Objective-C (ObjC) code written for Apple products.Super new, only appeared in 2014 and now the standard for iOS app developmentSwift is intended to be more resilient to erroneous code (“safer”) than Objective-C, and more concise. However it supports many core concepts that are associated with Objective-CReactReact (sometimes styled React.js or ReactJS) is an open-source JavaScript framework for building user interfaces(where you interact with the program)It is maintained by Facebook, Instagram and a community of individual developers and corporationsCurrently being used on the websites of Netflix, Imgur, Bleacher Report, Feedly, Airbnb, Seatgeek, HelloSign, Walmart, and othersIt allows developers to create large web applications that use data which can change over time, without reloading the pageIts main goal is to be fast, simple and scalable by processing only user interfaces in applicationsGoGoogles first language, Go aka ‘golang’ is a free and open source programming language created at Google in 2007 by Robert Griesemer, Rob Pike, and Ken ThompsonGo’s syntax includes changes from C aimed at keeping code concise and readablePhpPHP (acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTMLIt originally stood for Personal Home PageIts code may be embedded into HTML or HTML5 code, or it can be used in combination with various web template systems, web content management systems and web frameworks(uses a template processor to combine web templates to form finished web pages)HaskellHaskell is a standardized, general purpose purely functional programming languageThe latest standard of Haskell is Haskell 2010. As of May 2016, a group is working on the next version, Haskell 2020Haskell is based on the semantics , but not the syntax, of the language Miranda, which served to focus the efforts of the initial Haskell working groupIn computer science, functional programming is a programming paradigm — style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable dataFunctional programming languages have largely been emphasized in academia rather than in commercial software development
Making New Code: Ruby and Cryptography by on 04/17/2017
Cryptography Want a custom password only you knew how to make? Want to write your own code to customize it even more? How about sending a coded message to another person and encrypting/decrypting it yourselves?
MUCS SNOW by on 04/18/2017
On our second day (yes second) at the Flatiron School we were tasked with making a web request to the Star Wars API, use JSON to parse the data that we received and return information about different Star Wars characters and the movies they were in.At the time, I didn’t think twice about our ability to easily access what planet a character was from or the opening crawl that starts each Star Wars movie. However, as we began our first project to build an application that again calls an API to be able to manipulate and analyze data and started investigating APIs that we might want to use, I became aware of the restricted/invite-only and closed API systems.As evidenced in the rise of the API economy, the power of APIs is enormous. An API is code that can be used by another application so that the two programs to communicate and interact with each other. APIs encourage innovation by lessening the burden on developers to unnecessarily write the same code that ultimately has the same functionality. Also, more innovative applications can be built by allowing applications to talk to each other in such a way. From a business perspective, APIs can enable a company to reach more users and drive unexpected revenue by being “mixed” into other applications. Instagram originally used the Foursquare API to let users geotag or add location data to their pictures. This simple feature has made places and businesses “instagram famous” driving brand awareness and customer engagement — because if you didn’t gram it were you really there?Open vs. restricted vs. closed APIs is where it gets interesting. An open API (aka public API) means that third-party developers (aka me right now) can use the code or data to create or integrate with other software. While having access to so much already-created code and data makes our lives easier, we still need to be wary of some of the pitfalls of relying on open APIs such as not being able to manage security directly (hackers!), ensuring that the API is regularly maintained and losing all functionality if the API becomes restricted or closed. In 2014, Twitter limited third-party access to its API, shutting down many applications that relied on the Twitter API so that Twitter could have its users instead use their official apps and website (where they can show their own ads).This brings me to closed APIs. Closed APIs are created internally for a company and provide their employees the benefits of using pre-existing code and data while maintaining greater control over that data and the types of apps that are developed. It seems that many times the reason that companies, such as Twitter, change from an open to closed API is to protect their business. By having users use the official Twitter apps and website, Twitter was able to completely control the ads its users saw and increase revenues from online advertising. Instagram is said to have closed its feed API to clean up its platform and ensure a consistent user experience but increased advertising revenue seems to also have played a role in the change by again forcing users to use their app directly and gain greater ad revenue.This all being said, it doesn’t mean that closed APIs are bad and open APIs are good but maybe more that open APIs are gooder. While closed APIs allow for more control over data, software use and direct customer influence (via ads), open APIs can make your software reach more developers, who if they like it will tell other developers, who then create more unique, innovative things and then ultimately reach users that you never would have originally. As Nir Eyal puts it in his book Hooked: How to Build Habit-Forming Products: “Frequent usage creates more opportunities to encourage people to invite their friends, broadcast content, and share through word of mouth. Hooked users become brand evangelists— megaphones for your company, bringing in new users at little or no cost.”More on how this current API project goes shortly but now I am (and hope you are) more knowledgeable on open versus closed APIs!
The Fundamental Flaw of Object Oriented Programming: Or How I Learned to Stop Worrying and Love OOP.The appeal to Object Oriented Programming (hereafter referred to as OOP) is the promise of a means to accurately model real world phenomena. OOP proposes to do this through Classes, which might have just as easily been called categories. Classes primarily contain attributes, and methods, that are universal to any class that inherits from it. This is the basic premise of the parent-child paradigm in OOP. If you have a parent class “Bird” that instantiates every new member of the “Bird” class with the attributes “has feathers”, “has beak”, “color”, “weight” and a method that gives that model the ability to fly, you could potentially create a child class named “Robin” easily and accurately. Fill in a few attributes such as “color: red”, and “weight: 2.7oz” and you have what most people would describe as a robin.The advantages of this are obvious: classes are often likened to factories; they can crank out many instances of a template that can be easily altered to suit the individual model’s characteristics. In computation this is great thing.Let us take another look at our bird class. This time let us try and model a penguin. In psuedocode:Class: Penguinhas: feathers, beakcolor: black and whiteweight : 51lbdefine “fly”— — prints to screen “the bird takes flight” — —endAlready you may have noticed a problem here; the “Bird” class endows all of its’ child classes the ability to fly. Penguins are flightless, yet penguins are still birds.However this is an easily remedied issue, in reality not all birds fly, and in OOP our parent class can be modified. Rather than having a “fly” method, let us instead give the class a fly attribute and set it to a boolean value-either true or false, in this case false.Class: Penguinhas: feathers, beakcolor: black and whiteweight : 51lbfly: falseendFurther scrutiny, however, yields more concerns. Not all penguins are black and white, some have yellow plumage, others orange. But none of the above is fundamentally breaking of OOP. Actually in this way you should be able to categorize anything, becoming more and more specific until every aspect is considered; however unwieldy such a class might become. Indeed this is what is known as the Aristotelean, or the Classical view of categorization: everything is categorizable, categories are distinct, mutually exclusive, and are defined by their properties. OOP is based on the Classical view.Where the Classical view, and by extension OOP and much of scientific taxonomy breaks down is in so-called “fuzzy” attributes.Things like color, which is not discrete, makes categorizing-and by extension modeling-difficult. When exactly do the penguins feathers cross the threshold from red to orange?Perhaps such an example seems nitpicky and exceptional. But there are entire categories such as “games” that have few if any defining attributes. And what about things that fit equally well in multiple, even opposing, categories, such as Coumadin-a potentially life saving medicine that is also used as rat poison.Yet we categorize them all the same. How?Modern psychology has done their best with the Prototype and Exemplar theories.In brief, the Prototype theory of categorization states that not all attributes are weighted equal, that some are more prototypical of a category, and that the definition of a category is an average of all the instances of a category. How well something fits in a category is defined by how close to the category average it is.Exemplar theory is similar but suggests that for each of us there exists an “exemplar,” likely discovered in early childhood. It is from our exemplar that every potential instance of a category is compared, with things near the exemplar fitting into its’ category.To continue with our bird example: the robin is an excellent prototype, as it contains all of the features most highly associated with birds. It flies, has feathers, is small and says “tweet”.Prototype theory helps us make sense of how an ostrich is categorized as a bird as well as how soccer fits in both the game and exercise categories; the most prominent features of the ostrich-feathers, wings, beak cement it as a bird. The non exclusive aspect of prototype theory allows soccer to fit in multiple categories. Prototype theory may present a solution to our issue of categories in computation: computer scientists are already making use of Prototype Theory as a model of Machine Learning.But (it seems there is always a but with any theory) it seems unlikely that Prototype theory applied to Machine Learning will yield human style learning. The non exclusive aspect of Prototype Theory proves its undoing, as ultimately the problem with Prototype Theory is its’ reliance on semantics.“A source of problems, however, is the fact that the words used to express the membership criteria are not any more precise than the concept that one is trying to pin down — in this case, bird. What, for instance, is a foot? And what does “to possess” mean? What does “covered with” mean? And of course, everyone knows that there are all sorts of birds that don’t have two feet (perhaps because of an injury or a genetic defect) or that are not covered with feathers (ducklings and chicks, for example). And turning things around, we human beings have two feet, but if we hold a spray of feathers in our hand, this “possession” does not suffice to turn us into birds. And the famous plume de ma tante — my ancient aunt’s quill pen, which she loved to use to make beautiful calligraphy — would that count as a feather? And if so, would possession thereof make my bipedal old aunt a bird? — Douglas Hofstadter, 2013"Computers are fantastic at logical operations largely because logic is discrete. Categories, however, are not. Though humans use categories to make sense of the world, how we do so is not yet fully understood, and thus may never be entirely applicable to computers.There is a sense that the brain is itself a computer. In fact the field of Cognitive Psychology owes its’ existence to computers:“The most important factor that contributed to the development of cognitive psychology is the development of computer technology. In the late 1940s, the first modern computer by John von Neumann showed that machines could perform logical operations. In the 1950s, there were speculations that computers actually reflect the way the mind works. Herbert Simon (1969) was the first to compare the human mind to computer processing systems, saying that the brain is like the computer’s hardware, and the mind is the computer’s software. Sensory and perceptual systems, therefore, act like input channels; mental processes are analogous to software applications; memory storage is to disk storage; and, memory retrieval is to printer or screen display.”-http://general-psychology.weebly.com/how-did-the-cognitive-revolution-take-place-in-psychology.htmlThough the two are apparently similar; I believe equating computers to the brain to be a fallacy. Historically, psychology has tended to reflect the technology of the time. Renee Descartes, who was a product of the Renaissance explored psychology through philosophy. “I think therefore I am” was derived no different than how the Euclid wrote his proof of infinitely many prime numbers. Alternatively, Freud’s psychoanalytic theory was couched in terms of pneumatics: speaking to the building up of feelings and releasing of urges as the mechanisms that drove behavior.This does not invalidate the work of Descartes or Freud by any means. Instead it points to a larger phenomena:In the same way that one cannot bite their own teeth, neither can the brain know itself.At best we can look for indirect comprehension in the reflection of other sciences. Lately computer sciences.And so we arrive back to OOP. OOP is at best heuristic. It is based on a premise proposed by Aristotle, since proven inadequate.But thats ok.Heuristics have gotten us this far. And they will likely take us a great deal further. There is certainly something to be said for them, and OOP. Perhaps Bjarne Stroustrup-author of the programming language C++-puts it the best:“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
Getting Acquainted with the Marvel API by on 04/16/2017
Like many young and eclectic people of my generation I dabble in all arts nerd: comics, cooking, crafting, cartoons (of all kinds), coloring, clubbing, conventions, crime fighting, crab fishing … now we are just getting out of hand.
As far as I’m aware, I was the very last person on earth to get a smartphone. Considering just how hostile the world has always been of technological hold-outs, It’s an achievement that took considerable effort on my part. For years I’d been self-righteously tut-tutting at my friends and espousing all the clichéd accusations: You’re missing out on “real life,” You’re deadening yourself, You’re making some bro in California somewhere billions of dollars by creating, for free, content for his useless platform. As smartphones became more and more welcome and expected atop dinner tables across the country, I understood them, in the same manner my grandparents feared the “Boob tube”, to be the most obvious signaler of the coming End Times.As one ancient flip-phone crumbled to dust in my hands, I’d replace it with whatever older model — and matching charger — I could excavate from deeper within my mother’s closet, until, eventually, there were no more such artifacts to be found. The most sensible thing for me to do at this point, I knew, was to modernize — but sensibly! What did I have to be afraid of, really? A smartphone was like a dog: you just needed to establish yourself as leader-of-the-pack from the get-go. I would not be seduced by the tawdry Vegas-like razzle-dazzle of push-notifications and animated gifs. I would maintain my dignity, my self control. And Google Maps would actually be pretty useful, probably.It wasn’t long before I was taking pictures of my meals and uploading them onto Instagram. Conversations began to consist entirely of sentences beginning with “According to Google…” and this felt normal. I tended to my pinging phone with the same nervous-parent urgency that had once kept my Tamagotchis alive. I had been sucked in.But there were moments of lucidity, and, in these moments, I would fantasize about living in a mountain cabin somewhere, or joining some kind of ashram. I would then grab my phone to research the logistics of realizing these fantasies, eventually finding myself, hours later, watching television commercials from the Nineties that someone had inexplicably taken the time to upload onto Youtube. Yes, the internet was clearly a wondrous place — but it was inescapable.My first real attempt at resistance was trying to delete Safari from my phone, hoping that, without immediate access to a web browser at all times, my smartphone would more closely resemble, functionally speaking, an actual phone. Unfortunately, by design, Safari cannot be deleted. The best I could do was make it password protected: I made my brother set up the password and promise that he’d never reveal it to me no matter how much I begged and pleaded. (He now insists he’s forgotten what it is.)People look at me askance when they hear I’ve voluntarily eliminated a central feature of what makes a phone “smart”, but, in truth, it wasn’t, for my purposes, a drastic enough measure. I still had my laptop, after all, which was faster and easier to operate than my phone anyway. The workaround to this oversight was to eliminate my internet service altogether, and the corresponding counter-workaround was to just use my laptop to connect to my phone’s hotspot. Every trap I’d set for myself was thwarted by my own foxlike need to thwart my own plans — even if, as I did, it felt as though I was chewing off my own leg.The problem, ultimately, was not the internet. Nor was it any lack of self control on my part. After stumbling upon this remarkable essay by Nathan Jurgenson for The New Inquiry (which you should definitely read no matter what your thoughts on the subject are), I tried simply approaching the internet not as the object of a forbidden and dysfunctional romance but rather as what it was — a part of “reality” as much as any other. This might not be such a huge revelation for most, but, for me, it was like tearing down the curtain in the Emerald City of Oz. And, with this more measured approach, it becomes much easier to gain a sense of control over it. It’s a tool, after all — not a dragon.That being said, the internet is a tool that has been sharpened over the years by some developers seeking to monetize the distractibility of its users. That’s okay: there are solutions to this problem that don’t involve buying a cabin in the mountains.SelfControlFor starters, try SelfControl, a free web application that allows users to temporarily restrict internet freedom. It’s easy to use: you create your own blacklist or whitelist of URLS, set a timer, and forgo baby animal gifs for however long it takes for you to get done whatever it is you need to get done. And, like all web apps, it didn’t just appear out of nowhere—it was created by web developers who took a pragmatic approach, as opposed to a scorched-earth approach, to fixing a problem.