<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>Building and Breaking</description><title>Joe Hsu</title><generator>Tumblr (3.0; @jhsu)</generator><link>https://josephhsu.com/</link><item><title>named routes with react-router</title><description>&lt;p&gt;&lt;em&gt;While using &lt;code&gt;react-router&lt;/code&gt;, I was tired of manually constructing link paths and having to change paths whenever I moved things to different routes. I created &lt;a href="https://github.com/jhsu/react-router-namesake"&gt;react-router-namesake&lt;/a&gt; to solve this.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="https://raw.githubusercontent.com/jhsu/react-router-namesake/master/logo.png" alt="react-router-namesake logo"/&gt;&lt;/p&gt;

&lt;p&gt;I wanted to build something that allows the use of named routes. React 16 createContext had just come out and decided that it would be a good use of it.&lt;/p&gt;

&lt;h2&gt;Defining routes&lt;/h2&gt;

&lt;p&gt;I wanted to keep this really simple and not make too many assumptions on how the route definitions could be created, so I made a simple map of name to path. Using the &lt;code&gt;NamesakeRouter&lt;/code&gt; component, you pass in a map of the application routes.&lt;/p&gt;

&lt;p&gt;&lt;code data-gist-id="c6a943ce572d43d63a53fabadbdfb119" data-gist-file="routes.jsx"&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now that the routes are defined, in place of react-router’s &lt;code&gt;Link&lt;/code&gt; component, we use &lt;code&gt;NamesakeLink&lt;/code&gt; with a &lt;code&gt;to&lt;/code&gt; prop with the name of the route. We can also optionally pass in &lt;code&gt;params&lt;/code&gt; that might be needed to generate the path.&lt;/p&gt;

&lt;p&gt;&lt;code data-gist-id="c6a943ce572d43d63a53fabadbdfb119" data-gist-file="links.jsx"&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;onClick events&lt;/h2&gt;

&lt;p&gt;A common use of routing is to navigate on a click event. To support this, &lt;code&gt;react-router-namesake&lt;/code&gt; provides &lt;code&gt;WithNamesake&lt;/code&gt; component that gives you acces to a routes object. This is a wrapper around &lt;code&gt;react-router-namesake&lt;/code&gt;’s context consumer.&lt;/p&gt;

&lt;p&gt;You can then create a custom button like so:&lt;/p&gt;

&lt;p&gt;&lt;code data-gist-id="c6a943ce572d43d63a53fabadbdfb119" data-gist-file="ButtonLink.jsx"&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;experimentation&lt;/h2&gt;

&lt;p&gt;I also experiemented with utilities around generating the routes config, but it feels &lt;a href="https://github.com/jhsu/react-router-namesake/pull/6"&gt;too verbose to generate a simple mapping&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Feel free to check out the source code and see how I use React’s &lt;code&gt;createContext&lt;/code&gt; to provide named routes &lt;a href="https://github.com/jhsu/react-router-namesake"&gt;on github&lt;/a&gt;.&lt;/p&gt;</description><link>https://josephhsu.com/post/177591197751</link><guid>https://josephhsu.com/post/177591197751</guid><pubDate>Fri, 31 Aug 2018 09:25:27 -0700</pubDate><category>reactjs</category><category>javascript</category><category>webdev</category><category>open source</category><category>oss</category></item><item><title>react-native border progress bar</title><description>&lt;p&gt;I’ve been doing some experimenting with &lt;a href="https://facebook.github.io/react-native/"&gt;react-native&lt;/a&gt; recently. Great posts such as &lt;a href="http://browniefed.com/blog/2015/08/31/react-native-youtube-animated-video-slide/"&gt;React Native Youtube Animated Video Slide&lt;/a&gt; by &lt;a href="https://twitter.com/browniefed"&gt;@browniefed&lt;/a&gt; inspired me to write a post and learn more about layouts in react native.&lt;/p&gt;

&lt;p&gt;For the app I am working on, I wanted to come up with a novel way of displaying time progression. Instead of a simple line or cicle, my friend Warren had the idea to use the border around the screen and animate from the top left moving clockwise around the edges.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://cl.ly/image/2A3G251M2v0P/iphone_progress.png" alt="iphone progress indicator mock"/&gt;&lt;/p&gt;

&lt;p&gt;The way I decided to approach this was to make each border its own view. React Native uses flexbox for layout. In order to accomplish this, I split each border section into a two view layout. For the first border, I created a View that contains a view for the top border and a view for the rest of the screen’s content. Then inside the content view, I split that vertically with the content and the right border. I repeated this process until I had all for edges.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://cl.ly/image/0I080S1c3p2B/border%252520layout.png" alt="broken down into two views"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;i&gt;splitting the screen into two views, one for the top border and one for the rest of the screen and so on&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://cl.ly/image/0c1e2T402t19/sections.png" alt="combined views"/&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s the code I used to create this layout.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
const ExampleApp = React.createClass({
  render: function() {
    return (
      &amp;lt;View style={styles.container}&amp;gt;
        &amp;lt;View style={styles.borderH}&amp;gt;&amp;lt;/View&amp;gt;
        &amp;lt;View style={styles.contentH}&amp;gt;
          &amp;lt;View style={styles.contentV}&amp;gt;
            &amp;lt;View style={styles.contentH}&amp;gt;
              &amp;lt;View style={styles.borderV}&amp;gt;
              &amp;lt;/View&amp;gt;
              &amp;lt;View style={styles.contentV}&amp;gt;
                &amp;lt;Text&amp;gt;content&amp;lt;/Text&amp;gt;
              &amp;lt;/View&amp;gt;

            &amp;lt;/View&amp;gt;
            &amp;lt;View style={styles.borderH}&amp;gt;
            &amp;lt;/View&amp;gt;
          &amp;lt;/View&amp;gt;
          &amp;lt;View style={styles.borderV}&amp;gt;
          &amp;lt;/View&amp;gt;
        &amp;lt;/View&amp;gt;
      &amp;lt;/View&amp;gt;
    );
  }
});

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'column',
    marginTop: 20
  },
  borderH: {
    height: 20,
    backgroundColor: 'blue'
  },
  borderV: {
    width: 20,
    backgroundColor: 'green'
  },
  contentH: {
    flex: 1,
    backgroundColor: '#efefef',
    flexDirection: 'row'
  },
  contentV: {
    flex: 1
  }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;caption&gt;checkout the &lt;a href="https://rnplay.org/apps/T6qzEA" title="example on rnplay"&gt;example on rnplay&lt;/a&gt;&lt;/caption&gt;


&lt;p&gt;
&lt;img src="http://cl.ly/image/1M1l0w2W0h2U/Screen%20Shot%202015-09-24%20at%2010.05.38%20PM.png" width="250/"/&gt;&lt;/p&gt;


&lt;p&gt;
  Now let&amp;rsquo;s add progress to each border (I&amp;rsquo;m going to set a width for each border bar, but in a real scenario, the next clockwise border won&amp;rsquo;t be filled until the previous one has completely filled). We do this by adding a view inside each border view that has a width (or height if the bar is vertical) with a background color. I&amp;rsquo;m going to set the background color of the previously shown views to be white so that we can clearly see just the outside borders.
&lt;/p&gt;

&lt;p&gt;
&lt;img src="http://cl.ly/image/2v3r2M0N1c3R/Screen%20Shot%202015-09-24%20at%2010.12.40%20PM.png" width="250"/&gt;&lt;br/&gt;
As you can see, the bordersare not starting from a clockwise direction. That is because the content of the borders are left or top aligned. We need to tell the bottom border to align right and the left border to align bottom. The way we do that with flex is to set the bottom border (the view that contains the progress bar) to &lt;code&gt;flexDirection: 'row'&lt;/code&gt; so that flex knows which direction the content should orient and then &lt;code&gt;justifyContent: 'flex-end'&lt;/code&gt; which since we are using flex row, is the right-hand side. Similarily, for the left border, we set &lt;code&gt;flexDirection: column&lt;/code&gt; since it is vertical and then &lt;code&gt;justifyContent: 'flex-end'&lt;/code&gt; and &lt;strong&gt;BOOM&lt;/strong&gt;&lt;br/&gt;&lt;img src="http://cl.ly/image/1n1l213O3F33/Screen%20Shot%202015-09-24%20at%2010.20.05%20PM.png" width="250"/&gt;&lt;/p&gt;

&lt;p&gt;See the &lt;a href="https://rnplay.org/apps/jmBwpQ"&gt;final source on rnplay&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;
This is how I was able to create the layout for a progress bar that goes around the border of the screen. There are several parts I didn&amp;rsquo;t put in this post like how to determine what width to give to each progress bar view and also how to determine how much each bar should be filled given an overall percentage.
&lt;/p&gt;

&lt;p&gt;I hope you found this helpful in learning how to use flex in React Native. If you want to chat, hit me up on &lt;a href="https://twitter.com/jhsu"&gt;twitter (@jhsu)&lt;/a&gt; or join the &lt;a href="https://www.reactiflux.com//"&gt;reactiflux chat&lt;/a&gt;. I&amp;rsquo;ll leave you with this teaser &lt;br/&gt;&lt;img src="http://cl.ly/image/2e2X141P091O/Screen%20Recording%202015-09-24%20at%2010.23%20PM.gif" width="300"/&gt;&lt;/p&gt;</description><link>https://josephhsu.com/post/129849031387</link><guid>https://josephhsu.com/post/129849031387</guid><pubDate>Fri, 25 Sep 2015 08:00:23 -0700</pubDate><category>react-native</category><category>iphone</category><category>ios</category><category>reactjs</category></item><item><title>Building a flexible layout using AngularJS and UI-Router: Part 1</title><description>&lt;p&gt;&lt;em&gt;This is a series where I will be talking about building a flexible layout with angularjs and ui-router.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this first part, I will be giving some back-story, basics of ui-router and planning the layout.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;building an interactive UI&lt;/h1&gt;

&lt;p&gt;An app that I have been working on called &lt;strong&gt;Fit Entry&lt;/strong&gt; has been using minimal javascript to create user interactions on the client-side. It started off as simple jquery snippets and then brought in &lt;a href="http://backbonejs.org"&gt;backbone.js&lt;/a&gt; which provided a Models and Collections which were useful in interacting with the API. This worked great with the initial simple interactions, but I wanted to build better workflows and nicer interactions for users and backbone really didn&amp;rsquo;t allow the ease to develop such interactions.&lt;/p&gt;

&lt;p&gt;I decided to take the dive and pick up &lt;a href="http://angularjs.org/"&gt;Angular.js&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After rebuilding the API and setting up some controllers and views, I wanted nested views. The reason being that I wanted to show a list of items alongside a detail view of the item side by side. &lt;a href="http://github.com/mute"&gt;Natan&lt;/a&gt; found &lt;a href="https://github.com/angular-ui/ui-router"&gt;ui-router&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;planning the layout&lt;/h1&gt;

&lt;p&gt;The layout I wanted was a top navbar, sidebar, announcements pane, main pane, and details pane.&lt;/p&gt;

&lt;p&gt;To understand this layout, there are a few situations to know about and what they would show. The navbar would always we shown and the sidebar would almost always be shown.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/ae43a02842684876ab256013666e1cae/tumblr_inline_n2a7faRiQ31qz50th.png" alt=""/&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;the dashboard&lt;/strong&gt;: navbar, sidebar, announcements and the main pane. The details pane would be shown when clicking on something in the main pane and also hide the announcements pane.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;listing page&lt;/strong&gt;: show a table in the main pane, announcements and details would not be shown. When clicking on a row in the table, the details pane would be shown.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;brief intro to ui-router&lt;/h1&gt;

&lt;p&gt;UI-Router is a routing framework and uses &lt;code&gt;$stateProvider&lt;/code&gt; as an alternative to using &lt;code&gt;$routeProvider&lt;/code&gt; to map urls to controllers and templates. Instead of routes, ui-router uses states which are identified by a state name.&lt;/p&gt;

&lt;p&gt;Here is a simple example of using ui-router.&lt;/p&gt;

&lt;script src="https://gist.github.com/jhsu/9479447.js?file=ui-router-part-1-ex1.js"&gt;&lt;/script&gt;

&lt;p&gt;You can see that it defines things very similar to &lt;code&gt;$routeProvider&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In your main html template you would put &lt;code&gt;&amp;lt;div ui-view&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; and when visiting &lt;code&gt;/dashboard&lt;/code&gt;, the DashboardCtrl will execute and render &lt;code&gt;dashboard.html&lt;/code&gt; inside of the ui-view.&lt;/p&gt;

&lt;p&gt;Based on this simple example, you might be wondering how this is an advantage. The real power of ui-router comes from its ability to allow for child states. Here is an example of how a child state is used:&lt;/p&gt;

&lt;script src="https://gist.github.com/jhsu/9479447.js?file=ui-router-part-1-ex2.js"&gt;&lt;/script&gt;

&lt;p&gt;then inside of the &lt;code&gt;dashboard.html&lt;/code&gt; template you would put a link to this state using the &lt;code&gt;ui-sref&lt;/code&gt; attribute and make sure there is a &lt;code&gt;ui-view&lt;/code&gt; inside also, since that is where the child view will be rendered!&lt;/p&gt;

&lt;p&gt;The full path for the &lt;code&gt;dashboard.child&lt;/code&gt; state becomes &lt;code&gt;/dashboard/child&lt;/code&gt; since it inherits the prefix path from its parent, the &lt;code&gt;dashboard&lt;/code&gt; state.&lt;/p&gt;

&lt;script src="https://gist.github.com/jhsu/9479447.js?file=dashboard.html"&gt;&lt;/script&gt;

&lt;p&gt;Now when you visit &lt;code&gt;/dashboard&lt;/code&gt; and click &lt;code&gt;show the child view&lt;/code&gt;, the url will change to &lt;code&gt;/dashboard/child&lt;/code&gt; and render the &lt;code&gt;dashboard.child.html&lt;/code&gt; inside of &lt;code&gt;dashboard.html&lt;/code&gt;&amp;rsquo;s &lt;code&gt;ui-view&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/angular-ui/ui-router/wiki/Nested-States-%26-Nested-Views"&gt;Read more about ui-view nested states&lt;/a&gt; from the ui-router wiki.&lt;/p&gt;

&lt;h1&gt;thinking about implementation&lt;/h1&gt;

&lt;p&gt;Thinking about ui-router and the layout I desired, I had a hard time trying to figure out a way to represent this in a reusable way for multiple states and how to manage the states of each of the panes. In the next part I will go through some of the methods I tried and what I ended up settling on.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Leave any comments or suggestions about what you would like to know more about below&lt;/em&gt;&lt;/p&gt;</description><link>https://josephhsu.com/post/79273250581</link><guid>https://josephhsu.com/post/79273250581</guid><pubDate>Tue, 11 Mar 2014 10:04:00 -0700</pubDate><category>angularjs</category><category>ui-router</category></item><item><title>PDX</title><description>&lt;p&gt;Hello, everybody.&lt;/p&gt;

&lt;p&gt;I am now a resident (and homeowner) in Portland, OR!&lt;/p&gt;</description><link>https://josephhsu.com/post/68512000859</link><guid>https://josephhsu.com/post/68512000859</guid><pubDate>Fri, 29 Nov 2013 16:55:00 -0800</pubDate><category>life</category><category>portland</category></item><item><title>Nickel City Ruby Conference</title><description>&lt;a href="http://nickelcityruby.com"&gt;Nickel City Ruby Conference&lt;/a&gt;: &lt;h1&gt;Ruby Conference in Buffalo&lt;/h1&gt;

&lt;p&gt;Come on over to Buffalo, NY for our first Western New York ruby conference!&lt;/p&gt;

&lt;p&gt;I have been working with several others in the WNY Ruby community to bring this conference together and it’s finally coming!&lt;/p&gt;

&lt;p&gt;We have several great keynoters: Jeff Casimir, Sara Chipps, Zach Holman  and Neal Sales-Griffin and a range of interesting speakers and topics!&lt;/p&gt;

&lt;p&gt;There are also two events surrounding the conference.&lt;/p&gt;

&lt;h2&gt;Ignite Buffalo&lt;/h2&gt;

&lt;p&gt;“Ignite Buffalo is a rousing evening of food, drink and 5 minute lightning talks”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://ignitebuffalo.com/"&gt;http://ignitebuffalo.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Code Retreat&lt;/h2&gt;

&lt;p&gt;There is also a Code Retreat (you’ll learn a lot from this, I know from attending one a year ago) workshop that will have you pairing and doing code katas. You will learn lots from working under different constraints. This is definitely for all levels.&lt;/p&gt;

&lt;h2&gt;NYC Bus&lt;/h2&gt;

&lt;p&gt;There is a bus specially arranged by Ruby Central from NYC to Buffalo, NY.&lt;/p&gt;

&lt;h2&gt;Help others attend&lt;/h2&gt;

&lt;p&gt;If you want to sponsor a student to attend, contact &lt;a href="mailto:nickelcityruby@gmail.com"&gt;nickelctyruby@gmail.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Info&lt;/h2&gt;

&lt;p&gt;Find more information about the conference, speakers, events and &lt;a href="http://nickelcityruby.com"&gt;register on the website nickelcityruby.com&lt;/a&gt;.&lt;/p&gt;</description><link>https://josephhsu.com/post/60208024101</link><guid>https://josephhsu.com/post/60208024101</guid><pubDate>Tue, 03 Sep 2013 14:34:00 -0700</pubDate></item><item><title>Rails Workshop Reflection</title><description>&lt;p&gt;It&amp;rsquo;s been a week now since leading my first workshop &lt;a href="http://josephhsu.com/post/57445806980/introduction-to-ruby-on-rails-workshop-in-buffalo"&gt;Introduction to Ruby on Rails&lt;/a&gt; with &lt;a href="http://www.meetup.com/Girl-Develop-It-Buffalo/"&gt;Girl Develop It Buffalo&lt;/a&gt; and I have had some time to reflect on it.&lt;/p&gt;

&lt;h1&gt;workshop preperations&lt;/h1&gt;

&lt;p&gt;Install fest went well. I had students install vritualbox and use &lt;a href="http://www.vagrantup.com/"&gt;Vagrant&lt;/a&gt; to boot a ubuntu vm I had already set up. I wanted all students to work under the exact same environments. I had some issues with getting it all set up on windows, but besides that I think it went well.&lt;/p&gt;

&lt;p&gt;It worked well for the class, but it might have been useful to have a dev environment outside of a vm ready on their computers for after the class.&lt;/p&gt;

&lt;h1&gt;8-hours is not a lot of time&lt;/h1&gt;

&lt;p&gt;When putting together the curriculum I was nervous, wondering if I had enough material to fill the time.&lt;/p&gt;

&lt;p&gt;As someone who has been working with a technology, it is easy to forget many aspects. Steps become embedded as habits and fade out of the foreground.&lt;/p&gt;

&lt;h1&gt;Scaffolds&lt;/h1&gt;

&lt;p&gt;While experienced rails developers cringe at the thought of using the scaffold generator, it&amp;rsquo;s a huge time saver when teaching. Generating a model, migration, views, controller and actions with basic CRUD is super useful.&lt;/p&gt;

&lt;p&gt;Once the first scaffold is generated, it also makes a great way to explain the process of a request coming into a rails app without breaking the explanation while building the different parts.&lt;/p&gt;

&lt;h1&gt;Explain, Show, Do.&lt;/h1&gt;

&lt;p&gt;During the class, I would explain one topic such as adding a route, had each person follow along, then having them do the same with a different resource.&lt;/p&gt;

&lt;p&gt;I like this process, but I would probably have split things up differently. I think it might have been better to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;explain and show&lt;/strong&gt; - Go through the topic while students them, then show it in use&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;do&lt;/strong&gt; - after a few related topics have gone through explain &amp;amp; show, have students use what they learned collectively. This would raise signals in what topics needed more attention&lt;/li&gt;
&lt;/ol&gt;

&lt;hr&gt;

&lt;p&gt;I enjoyed teaching the workshop and hope the students got something useful from it. I enjoy enabling others. Maybe I&amp;rsquo;ll do something simlar in the future.&lt;/p&gt;</description><link>https://josephhsu.com/post/60099946031</link><guid>https://josephhsu.com/post/60099946031</guid><pubDate>Mon, 02 Sep 2013 11:59:41 -0700</pubDate></item><item><title>Introduction to Ruby on Rails Workshop in Buffalo</title><description>&lt;p&gt;In preparation for &lt;a href="http://nickelcityruby.com/"&gt;Nickel City Ruby Conference&lt;/a&gt;, I will be teaching a workshop with Girl Deveop It Buffalo. The workshop will be an &lt;a href="http://www.meetup.com/Girl-Develop-It-Buffalo/events/125650112/"&gt;&lt;strong&gt;Introduction to Ruby on Rails&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;What to expect&lt;/h1&gt;

&lt;p&gt;This workshop will be hands-on walkthrough on getting started with web development using Ruby on Rails.&lt;/p&gt;

&lt;p&gt;You will learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the Ruby on Rails framework&lt;/li&gt;
&lt;li&gt;development workflow with Rails&lt;/li&gt;
&lt;li&gt;working with third-party libraries (rubygems)&lt;/li&gt;
&lt;li&gt;building an application with users&lt;/li&gt;
&lt;li&gt;basics of deploying an application&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Who can attend? Do I need to know how to program?&lt;/h1&gt;

&lt;p&gt;While the event is held under Girl Develop It,  anyone can attend!&lt;/p&gt;

&lt;p&gt;You don&amp;rsquo;t need to know how to program, you just need to be motivated to learn. This is about building something.&lt;/p&gt;

&lt;p&gt;You will learn through doing and learn how to use the many resources to effectively learn more.&lt;/p&gt;

&lt;h1&gt;Install Fest&lt;/h1&gt;

&lt;p&gt;We will be holding an Install Fest the night before the workshop ( Friday, August 23rd, 2013 – 6:00pm-9:00pm) at the &lt;a href="http://maps.google.com/maps?q=100+Corporate+Parkway+Suite+342%2C+Buffalo%2C+NY"&gt;Buffalo Engine Yard office&lt;/a&gt; to help get a development environment set up so that everything is ready for the workshop.&lt;/p&gt;

&lt;h1&gt;Schedule&lt;/h1&gt;

&lt;p&gt;The workshop is split into two sessions.&lt;/p&gt;

&lt;p&gt;Both sessions will be at &lt;a href="http://maps.google.com/maps?q=100+Corporate+Parkway+Suite+342%2C+Buffalo%2C+NY"&gt;Engine Yard&amp;rsquo;s Buffalo office&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Friday, August 23rd, 2013 6:00pm - 9:00pm&lt;/li&gt;
&lt;li&gt;Saturday and Sunday August 24-25, 2013 12pm - 4pm&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Register&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://www.meetup.com/Girl-Develop-It-Buffalo/events/125650112/"&gt;Register at the Meetup page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Cost&lt;/h2&gt;

&lt;p&gt;The workshop is $80 for two 4-hour sessions&lt;/p&gt;

&lt;p&gt;Girl Develop It has a great article on 
&lt;a href="http://girldevelopit.tumblr.com/post/49417934562/every-girl-develop-it-member-should-ask-for-tuition"&gt;How to ask your employer for reimbursement&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope to see you there and don&amp;rsquo;t forget to &lt;a href="http://nickelcityruby.com/#register"&gt;register&lt;/a&gt; for Nickel City Ruby conference!&lt;/p&gt;</description><link>https://josephhsu.com/post/57445806980</link><guid>https://josephhsu.com/post/57445806980</guid><pubDate>Mon, 05 Aug 2013 12:00:29 -0700</pubDate><category>ruby</category><category>rails</category><category>workshop</category><category>girlsdevelopit</category><category>meetup</category></item><item><title>Calendar UI for an app I am working on. It uses a backbone view...</title><description>&lt;img src="https://64.media.tumblr.com/9a79fab695011a3205af5fc2b19135e3/tumblr_mp31rwFfkJ1qz50tho1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Calendar UI for an app I am working on. It uses a backbone view and model, renders client-side and uses pushState for navigating dates and months.&lt;/p&gt;</description><link>https://josephhsu.com/post/54068024343</link><guid>https://josephhsu.com/post/54068024343</guid><pubDate>Thu, 27 Jun 2013 20:02:00 -0700</pubDate><category>design</category><category>frontend</category><category>javascript</category><category>coffeescript</category></item><item><title>Working with the stripe API</title><description>&lt;p&gt;Recently I have been integrating an app to work with stripe API and thought I&amp;rsquo;d share some things I learned. Please excuse my coffeescript =).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Know where to find the docs&lt;/li&gt;
&lt;li&gt;Use the correct publishable key&lt;/li&gt;
&lt;li&gt;Protect customer credit cards and yourself&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t have to require cvc when it&amp;rsquo;s not required&lt;/li&gt;
&lt;li&gt;Stripe application webhooks (&lt;strong&gt;added&lt;/strong&gt;: July 18th, 2013)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;&lt;a href="https://github.com/stripe/stripe-ruby"&gt;stripe-ruby&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Reading the &lt;a href="http://rubydoc.info/gems/stripe/frames"&gt;rubydoc &lt;/a&gt; is hard, since things are so abstracted you&amp;rsquo;ll have to hop from class to class. Just check out the stripe documentation at  &lt;a href="https://stripe.com/docs/api/ruby"&gt;https://stripe.com/docs/api/ruby&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Stripe Connect&lt;/h2&gt;

&lt;p&gt;if you are making stripe requests both server-side and client-side, you will have to ensure you are using the right access tokens and publishable keys!&lt;/p&gt;

&lt;p&gt;This bit me once when I was using stripe.js to add a card to a customer client-side (so the card info never touches the server but gets a token from stripe) and was setting&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY');
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to my stripe account, but it needs to be set to the stripe connected account&amp;rsquo;s stripe publishable key. You should be storing that along with the access token in your database for future reference. Hint: save all the attributes stripe gives you because you never know when you will need them:&lt;a href="https://stripe.com/docs/connect/oauth"&gt; https://stripe.com/docs/connect/oauth&lt;/a&gt; .&lt;/p&gt;

&lt;h2&gt;Stripe.js (&lt;a href="https://stripe.com/docs/stripe.js"&gt;stripe docs&lt;/a&gt;)&lt;/h2&gt;

&lt;h3&gt;Protecting credit-cards&lt;/h3&gt;

&lt;p&gt;Protect your users and yourself from exposing credit card information by not having it even touch your server.&lt;/p&gt;

&lt;p&gt;Using stripe.js you can create a form with inputs for credit card inputs that is submitted to stripe and returns to you very basic info (last 4-digits, etc) , which you can store on your server, and a single-use token that references a credit card.&lt;/p&gt;

&lt;p&gt;Stripe gives you a &lt;a href="https://stripe.com/docs/stripe.js/switching"&gt;basic implementation for doing this&lt;/a&gt;, but lacks a few things such as submitting the basic card information back to your server, and also while the stripe docs say that the card CVC is optional, using the boilerplate stripe.js form, a card would be rejected without it.&lt;/p&gt;

&lt;p&gt;To pass the card&amp;rsquo;s basic information to the server, I append hidden inputs to the form with the basic information&lt;/p&gt;

&lt;script src="https://gist.github.com/jhsu/5846184.js"&gt;&lt;/script&gt;

&lt;p&gt;Since the CVC number from the card is not required, but it is checked for when submitting to stripe, the input needs to be checked and removed before submitting it to stripe.&lt;/p&gt;

&lt;script src="https://gist.github.com/jhsu/5856306.js"&gt;&lt;/script&gt;

&lt;p&gt;I use these simple functions to check if cvc is blank and simply remove it before calling &lt;code&gt;Stripe.createToken(form, ...)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s the working coffeescript class I use to handle stripe.js interactions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/jhsu/5845970"&gt;Handling stripe.js interactions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code could be cleaned up a lot more, but the way it works is through the &lt;code&gt;bindStripeForm()&lt;/code&gt; handling the form submission to get a stripe payment method token which then &lt;code&gt;stripeResponseHandler()&lt;/code&gt; passes information to &lt;code&gt;StripePaymentMethodForm&lt;/code&gt; to render any error messages and then add basic payment information as hidden inputs into the form and submits it along with the stripe payment method token to the server.&lt;/p&gt;

&lt;h2&gt;Stripe application webhooks&lt;/h2&gt;

&lt;p&gt;Stripe webhooks are handled slightly differently for a standalone Stripe integration versus a Stripe application. What this means is if you have a stripe application where others can integrate their own stripe accounts.&lt;/p&gt;

&lt;p&gt;When setting up a stripe events callback, I noticed I was getting several exceptions for &lt;code&gt;Stripe::InvalidRequestError: No such event: evt_****; a similar object exists in test mode, but a live mode key was used to make this request.&lt;/code&gt;. This means that &lt;strong&gt;test events are being sent to a live events callback&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I confirmed this after checking the documentation under &lt;strong&gt;Configuring your webhooks&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;You can enter any URL you&amp;rsquo;d like to have receive the events. The mode determines whether test events or live events are sent to this URL — if you want to send both live and test events to the same URL you need to create two separate settings (&lt;strong&gt;application webhooks do not follow this rule&lt;/strong&gt;).&lt;/blockquote&gt;

&lt;p&gt;What this means is you will have to for &lt;code&gt;livemode&lt;/code&gt; root level param to see if the event should be ignored.&lt;/p&gt;</description><link>https://josephhsu.com/post/53854384155</link><guid>https://josephhsu.com/post/53854384155</guid><pubDate>Tue, 25 Jun 2013 10:30:00 -0700</pubDate><category>ruby</category><category>stripe</category><category>rails</category><category>coffeescript</category><category>javascript</category></item><item><title>The Prototyping of Medium</title><description>&lt;a href="http://www.teehanlax.com/story/medium"&gt;The Prototyping of Medium&lt;/a&gt;: &lt;p&gt;Great story about the development of the idea of Medium and the process in rapidly prototyping and filtering ideas to something simple and focused.&lt;/p&gt;</description><link>https://josephhsu.com/post/47631896912</link><guid>https://josephhsu.com/post/47631896912</guid><pubDate>Wed, 10 Apr 2013 11:00:28 -0700</pubDate><category>medium</category><category>development</category></item><item><title>Joining Engine Yard</title><description>&lt;p&gt;On January 11, 2013, I had my last day at Academic Software Plus and will be the Platform Team at &lt;a href="http://engineyard.com"&gt;Engine Yard&lt;/a&gt; in about a week.&lt;/p&gt;

&lt;p&gt;I was the companies first intern back in 2009, and was hired at the end of the internship and I accepted my first full-time job as a web developer.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/ea9a198b5308dd9b0ff02fecef1bc821/tumblr_inline_mgjfnwGT4k1qz50th.jpg" alt="makeshift Best Intern Award"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;makeshift Best Intern Award. We found this plaque when we expanded our office space and it was repurposed using the label maker.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I was able to be there at the start of a large project being written in Ruby on Rails and help it go live in under a year. I watched the team grow in terms of skill and size.&lt;/p&gt;

&lt;p&gt;I was able to attend my first developer conference (&lt;a href="http://mtnwestrubyconf.org/"&gt;mountain west ruby&lt;/a&gt;) and several others. I was able to be a part of &lt;a href="http://www.meetup.com/Western-New-York-Ruby/"&gt;WNY Ruby group&lt;/a&gt; and the company has been backing the group since as long as I can remember.&lt;/p&gt;

&lt;p&gt;It has been a great experience working at &lt;a href="http://academicsoftwareplus.com/"&gt;AS+&lt;/a&gt;. While there, I learned to work in a team.&lt;/p&gt;

&lt;h2&gt;The changes you make impact others.&lt;/h2&gt;

&lt;p&gt;The changes you make impact others and you have to understand whatever you push, must be ready for others to pull in. So, don&amp;rsquo;t commit those git conflicts, don&amp;rsquo;t forget database migrations or even don&amp;rsquo;t forget to check in an updated database schema file.&lt;/p&gt;

&lt;h2&gt;Keep things clean.&lt;/h2&gt;

&lt;p&gt;Clean commit history helps a lot. When someone looks at the &lt;code&gt;git log&lt;/code&gt; they should be able to read it, and not like reading a 14 year old&amp;rsquo;s twitter feed (&amp;ldquo;OMG&amp;rdquo;, &amp;ldquo;LOL&amp;rdquo;, &amp;ldquo;HE TOLD ME TO!&amp;rdquo;, etc.). rebase your feature before you merge in to make sure you adjust your work on top of others.&lt;/p&gt;

&lt;h2&gt;Allow people to figure things out easily.&lt;/h2&gt;

&lt;p&gt;The original author will not always be available to explain the reasoning behind decisions or easily decipher the purpose of methods. Make things easier for everyone and document. This is a lesson learned through growing pains and especially harder justify when things are changing frequently. But, better late than never.&lt;/p&gt;

&lt;h2&gt;The best way for change is to encourage.&lt;/h2&gt;

&lt;p&gt;Sometimes small pains just pile up and it all becomes this larger monster that no one wants to attempt. People will yell about the pains, which helps bring awareness, but what really helps is when someone is able to say, &amp;ldquo;here was a problem, here&amp;rsquo;s the start of a solution&amp;rdquo;.&lt;/p&gt;

&lt;h2&gt;Leaving&lt;/h2&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/afa8b9d14177bf98dc3b92c1ba8c8b23/tumblr_inline_mgjfolNaDw1qz50th.jpg" alt="Accumulated office possessions"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Accumulated office possessions. Lots of coffee mugs, a few &lt;a href="http://foldable.me"&gt;foldable.me&amp;rsquo;s&lt;/a&gt;, a giant mousepad and some led lights.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I ran &lt;a href="http://gitstats.sourceforge.net/"&gt;gitstats&lt;/a&gt; on our main application&amp;rsquo;s git commit history and got some interesting stats from it.&lt;/p&gt;

&lt;p&gt;I was the number 1 commiter at 26% of all commits since August 2009. I removed more lines than I have added in commits (I&amp;rsquo;d like to think that&amp;rsquo;s a good thing).&lt;/p&gt;

&lt;h1&gt;The future at Engine Yard&lt;/h1&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/36d99b4a6e5a716b542a968ce157959d/tumblr_inline_mfr0bgz9Jm1qz50th.png" alt="Engine Yard"/&gt;&lt;/p&gt;

&lt;p&gt;I look forward to joining Engine Yard and the awesome people in the Platform team that I had the pleasure of meeting in Portland, OR and the former &lt;acronym title="Academic Software Plus"&gt;AS+&lt;/acronym&gt; employee &lt;a href="https://twitter.com/jimlindley"&gt;Jim Lindley&lt;/a&gt;. I will also be hanging out with the Buffalo team in their office.&lt;/p&gt;

&lt;p&gt;I do not know too much about exactly what I will be working on, but look forward to some big things!&lt;/p&gt;</description><link>https://josephhsu.com/post/40795038932</link><guid>https://josephhsu.com/post/40795038932</guid><pubDate>Thu, 17 Jan 2013 15:21:00 -0800</pubDate><category>engine yard</category><category>life</category><category>employment</category><category>job</category></item><item><title>"From Pitch to Plan: Learn the Secret" talk by George Chamoun of Synacor </title><description>&lt;p&gt;&lt;a href="http://academy.buffalo.edu/"&gt;Undergraduate Academics&lt;/a&gt; of University at Buffalo hosted a talk by &lt;a href="http://www.synacor.com/about-us/executive-team/" title="George Chamoun's profile on Synacor's website"&gt;George Chamoun&lt;/a&gt;, a founder and now executive vice president of &lt;a href="http://synacor.com/" title="Synacor website"&gt;Synacor&lt;/a&gt;, about starting a company.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_me88cxkw511qz50th.jpg" alt="Event Poster"/&gt;&lt;/p&gt;

&lt;h2&gt;The Big Idea&lt;/h2&gt;

&lt;p&gt;George told his story of starting Synacor, fresh out of college as an alumni of University at Buffalo.  They were sports fans and thought it would be awesome to have an email @ domain of their favorite team instead of just @hotmail.com, which George said sounded &amp;ldquo;like a porn site.&amp;rdquo; They would then partner with companies to brand emails with advertisement in exchange for the email service. So they had an idea, but they faced the classic dilemma for startups, an idea but no capital or even anything built.&lt;/p&gt;

&lt;h2&gt;Path to Starting&lt;/h2&gt;

&lt;p&gt;Luckily, one of the founders was interning at a company, and after pitching the idea, was able to not only get an adviser to help guide them, but also space in the office for them to meet and work out of.&lt;/p&gt;

&lt;p&gt;They had a space, but they were business guys and still needed an engineer to build the platform.  They approached a local developer, Mark Musone, and pitched him the idea. As a result, they were able to have him do the development, but in exchange, they would help work on his house. This meant putting up drywall, putting in windows and a stairway. They now had an employee&amp;hellip; and employer.&lt;/p&gt;

&lt;h2&gt;First Customer&lt;/h2&gt;

&lt;p&gt;In order to get their first customer, they decided to provide the service for free. They approached the Buffalo Bisons and asked to have a link placed on their site for email signups.&lt;/p&gt;

&lt;p&gt;From there, they were able to get more customers and more advertisers. Three years after that, they had over 200 customers!&lt;/p&gt;

&lt;h2&gt;Seeking Investors&lt;/h2&gt;

&lt;p&gt;When finding people to invest, you should think about what people are interested in and focus on that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;People believe in markets and people.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;The Secret: PHD&lt;/h1&gt;

&lt;p&gt;The big secret to starting a company. George revealed his ideology behind being successful at starting a company, the acronym PHD.&lt;/p&gt;

&lt;h2&gt;P - Passion&lt;/h2&gt;

&lt;p&gt;He sees passion as having believe in yourself and your dream. As time passes, this makes things fun.&lt;/p&gt;

&lt;h2&gt;H - Hours&lt;/h2&gt;

&lt;p&gt;Devote more time than others. Put in that extra effort and immerse yourself in your field. Devoting time becomes more and more natural.&lt;/p&gt;

&lt;h2&gt;D - Discipline&lt;/h2&gt;

&lt;p&gt;Be able to focused to your goals. Out of the three, this becomes harder over time and needs more attention.&lt;/p&gt;

&lt;h1&gt;Takeaway&lt;/h1&gt;

&lt;p&gt;From this talk, I learned how important it is to find advisers to fill in those knowledge gaps.&lt;/p&gt;

&lt;p&gt;During Q&amp;amp;A, he answered the question of how to address self-doubt or second guessing. He said that you are going to be 50% wrong, but also 50% right and just know that and be ok with that. This made me think that beyond that, you should know the next step to take if you are going to be wrong, that way you have confidence no matter if you are right or wrong.&lt;/p&gt;</description><link>https://josephhsu.com/post/36786761170</link><guid>https://josephhsu.com/post/36786761170</guid><pubDate>Wed, 28 Nov 2012 19:33:38 -0800</pubDate><category>startup</category><category>entrepreneurship</category></item><item><title>Startup Weekend Buffalo 2012</title><description>&lt;p&gt;The first &lt;a href="http://buffalo.startupweekend.org"&gt;Startup Weekend Buffalo&lt;/a&gt; happened this past weekend November 16-18, 2012.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s the experience I had.&lt;/p&gt;

&lt;h1&gt;The Start&lt;/h1&gt;

&lt;h2&gt;Day 1&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Started at 6:30pm&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We listened to some speakers talk about how the Startup Weekends started and some inspiring words from Eric Reich and Tom McManus.&lt;/p&gt;

&lt;p&gt;Then we went into pitches.&lt;/p&gt;

&lt;p&gt;I pitched an idea for a mobile app. I was super nervous for those 60 seconds, despite that, I said what I said. We wrote our ideas on large sheets of paper and posted them up on the surrounding walls. We were given 3 sticky notes to place on the ideas we liked.&lt;/p&gt;

&lt;p&gt;Several groups wrote their idea name and a few paragraphs about what they were about. They even stood by their poster to pitch to anyone with a sticky note. I wasn&amp;rsquo;t sure if that was something that was allowed. I probably should have written more on my poster and stood by it, but I wanted to mingle.&lt;/p&gt;

&lt;p&gt;I was pretty bummed about not having my idea voted, but as luck would have it, I found an idea that clicked with me.&lt;/p&gt;

&lt;p&gt;We formed our group, made up of Devin, &lt;a href="https://twitter.com/beth_weinberg"&gt;Elizabeth&lt;/a&gt;, &lt;a href="https://twitter.com/jhsu"&gt;myself&lt;/a&gt;, and &lt;a href="https://twitter.com/nb3004"&gt;Nicholas&lt;/a&gt;, discussed the idea further and worked out our next steps. Elizabeth Weinberg, the idea-pitcher, walked us through her experience and what she believed the solution would be.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_mdr60uEA2Z1qz50th.jpg" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;The problem we are trying to solve is that public relation professionals need to distribute their releases, but the current methods are inefficient and painful. The accepted way is to blast it to journalists and writers or send it directly in hopes that it will not be missed. This process is very inefficient. We want to help get valuable information to interested parties.&lt;/p&gt;

&lt;p&gt;We had 2 developers (including myself), 1 front-end dev / designer, 2 non-technical people (taking care of validation,  research and formalizing our idea).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Day ended for our group at about 1am, though I continued to work through to about 3-4am at home.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Day 2&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;I got in a little before 9am&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Group met, found a table near an outlet and had breakfast.&lt;/p&gt;

&lt;p&gt;We had a discussion about which language to go with, since one was a php developer and myself a ruby dev. We discovered that the night before (well, more like morning 1am-3am) we both had separately already started. We decided to go with rails =). I got the team set up for development. Installing dependencies was an adventure.&lt;/p&gt;

&lt;p&gt;We were able to merge in the front-end design work being done into our application with relative ease.&lt;/p&gt;

&lt;p&gt;We settled on the name PRessConnect and we got cracking on building the platform.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_mdr0i1rWS71qz50th.jpg" alt="PRessConnect Day 2 working hard"/&gt;&lt;/p&gt;

&lt;p&gt;Groups of mentors were introduced to our groups and ideas and were able to ask some quick questions. As they day went on, the mentors walked around and were able to spend time individually with groups. We had some great mentors to speak to and showed genuine interest and also were able to give us harsh feedback, which is super useful in pointing out questions we need to have answers for.&lt;/p&gt;

&lt;p&gt;The questions that seemed important for our solution seemed to be about rollout and competition.&lt;/p&gt;

&lt;p&gt;We got some good food.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_mdr60cHY4W1qz50th.jpg" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Fat Bob&amp;rsquo;s&lt;/p&gt;

&lt;p&gt;We continued to do research on competition and got feedback from journalists, PR professionals and small companies that might need to issue their own press releases.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Headed home at about 2am.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Day 3&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Somehow, I was able to get in before 10 am.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We continued working on the platform, getting the UI looking decent and functioning.&lt;/p&gt;

&lt;p&gt;I fixed up user registrations, made sure a user could sign up as either a journalist or publicist. Several parts of the ui needed to be tweaked. The front page, press release creation and dashboards were essential and wanted to make sure those were solid.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_mdr2jcQmBj1qz50th.jpg" alt="screenshots"/&gt;&lt;/p&gt;

&lt;p&gt;We had a lot of questions we had to make sure we had answers to. Definitely had my head in code and needed to pull back and make sure we worked on what was most important, our presentation and pitch.&lt;/p&gt;

&lt;p&gt;A lot of the time was spent just thinking and discussing.&lt;/p&gt;

&lt;p&gt;Presentations started at about 5 pm.&lt;/p&gt;

&lt;p&gt;We were lined up at number 12.&lt;/p&gt;

&lt;p&gt;I wasn&amp;rsquo;t nervous. We were solving a visible problem and were one of the few teams with working demos and it felt good. Plus, I didn&amp;rsquo;t have to speak.&lt;/p&gt;

&lt;p&gt;Presentation went well.&lt;/p&gt;

&lt;p&gt;We got some tough questions about existing competitors. I feel like we provide more as not being that blast out and allows journalists and writers to be part of the communication.&lt;/p&gt;

&lt;p&gt;The winners of the event were Do Something. A mobile app similar to Draw Something, except words were acted out in video instead of drawn.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/tumblr_mdr626CQKJ1qz50th.jpg" alt="Do Something"/&gt;&lt;/p&gt;

&lt;h2&gt;The Aftermath&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;We didn&amp;rsquo;t win.&lt;/strong&gt; That&amp;rsquo;s ok. We still believed in our idea.&lt;/p&gt;

&lt;p&gt;Getting customer validation over a weekend before a national holiday is hard.&lt;/p&gt;

&lt;p&gt;We got mentioned in the Startup Weekend article in &lt;a href="http://www.buffalonews.com/apps/pbcs.dll/article?AID=/20121118/CITYANDREGION/121119172/1003"&gt;Buffalo News&lt;/a&gt; and I even got quoted!&lt;/p&gt;

&lt;p&gt;Hopefully you&amp;rsquo;ll hear more about PRessConnect soon =).&lt;/p&gt;

&lt;h2&gt;The Tech&lt;/h2&gt;

&lt;p&gt;For those of you that are interested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ruby 1.9.3&lt;/li&gt;
&lt;li&gt;Rails 3.2.8&lt;/li&gt;
&lt;li&gt;&lt;a href="http://puma.io/"&gt;puma&lt;/a&gt; app server&lt;/li&gt;
&lt;li&gt;postgres database&lt;/li&gt;
&lt;li&gt;hosted on Heroku&lt;/li&gt;
&lt;li&gt;devise for authentication&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ryanb/cancan"&gt;cancan&lt;/a&gt; for authorization&lt;/li&gt;
&lt;li&gt;bootstrap for base styles and grid layout&lt;/li&gt;
&lt;/ul&gt;</description><link>https://josephhsu.com/post/36086388745</link><guid>https://josephhsu.com/post/36086388745</guid><pubDate>Mon, 19 Nov 2012 13:14:00 -0800</pubDate><category>swbuffalo</category><category>buffalo</category><category>hackathon</category></item><item><title>Stop waiting.</title><description>&lt;p&gt;Note to self: &lt;a href="http://dcurt.is/the-waiting-place"&gt;stop waiting&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Great&lt;/em&gt; piece and except from a Dr. Seuss called &lt;em&gt;Oh, The Places You’ll Go!&lt;/em&gt;&lt;/p&gt;</description><link>https://josephhsu.com/post/35128015704</link><guid>https://josephhsu.com/post/35128015704</guid><pubDate>Tue, 06 Nov 2012 07:05:48 -0800</pubDate><category>link</category><category>waiting</category><category>gtd</category></item><item><title>RailsRumble 2012: Bring-a-Thing</title><description>&lt;p&gt;For RailsRumble, we decided to create a group to represent our local &lt;a href="http://www.meetup.com/Western-New-York-Ruby/"&gt;WNY Ruby meetup group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We formed our gang of four:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://dl.dropbox.com/u/114389/railsrumble-mexican.jpg" alt="Rumblers"/&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Myself, &lt;a href="http://twitter.com/jhsu"&gt;Joseph Hsu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twitter.com/1ofyourmeteors"&gt;Mark Josef&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twitter.com/aquaranto"&gt;Amanda Quaranto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twitter.com/deliverator_"&gt;Stan Hiller&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We started a few hours late (DARN YOU TIMEZONES CONVERSIONS!), but we put in the 48-hours. Our app idea came from &lt;a href="http://twitter.com/1ofyourmeteors"&gt;Mark&lt;/a&gt;. The app would help manage what people are to bring to a party.&lt;/p&gt;

&lt;h1&gt;&lt;a href="http://wny-ruby-represent.r12.railsrumble.com/"&gt;Bring-a-Thing&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;&lt;img src="http://dl.dropbox.com/u/114389/Screenshots/0-.jpg" alt="Bring-a-Thing"/&gt;&lt;/p&gt;

&lt;p&gt;Don&amp;rsquo;t forget to check out our &lt;a href="http://railsrumble.com/entries/364-bring-a-thing"&gt;RailsRumble Page&lt;/a&gt; and vote for us!&lt;/p&gt;</description><link>https://josephhsu.com/post/33639440004</link><guid>https://josephhsu.com/post/33639440004</guid><pubDate>Mon, 15 Oct 2012 06:55:17 -0700</pubDate><category>rails</category><category>railsrumble</category><category>hackathon</category></item><item><title>Rails Responders: Versioning an API</title><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: Not sure if this is a good idea or not, but so far I like it. Let me know what you think about this on twitter &lt;a href="http://twitter.com/jhsu"&gt;@jhsu&lt;/a&gt; or comment on my &lt;a href="https://gist.github.com/3820162"&gt;gist&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In order to version an API I decided to try and follow what conventions I could. I decided to do something similar to &lt;a href="http://developer.github.com/"&gt;Github&lt;/a&gt; and what&amp;rsquo;s talked about in &lt;a href="http://freelancing-gods.com/posts/versioning_your_ap_is"&gt;Versioning Your APIs&lt;/a&gt; by setting the version in the headers &amp;lsquo;Accept&amp;rsquo; param and putting 'v1&amp;rsquo; in the vnd suffix (is that what is called?).&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://github.com/plataformatec/responders"&gt;Responders&amp;rsquo;&lt;/a&gt; functionality that &lt;code&gt;ActionController::Responder&lt;/code&gt; makes use of, I created a custom responder to determine the version of the API during a request and using the decorator pattern (through the &lt;a href="https://github.com/jcasimir/draper"&gt;draper&lt;/a&gt; gem) to have different decorators for each version and each resource.&lt;/p&gt;

&lt;p&gt;The Responder:
&lt;script src="https://gist.github.com/3820162.js?file=hyper_api.rb"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;In the controllers:
&lt;script src="https://gist.github.com/3820162.js?file=base_controller.rb"&gt;&lt;/script&gt;
&lt;script src="https://gist.github.com/3820162.js?file=users_controller.rb"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;h2&gt;Update (2 Oct., 2012)&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This was presented at WNYRuby 2 Oct., 2012. Here are the slides.&lt;/em&gt;&lt;/p&gt;

&lt;script async class="speakerdeck-embed" data-id="506b876c2838cc000202775a" data-ratio="1.299492385786802" src="//speakerdeck.com/assets/embed.js"&gt;&lt;/script&gt;</description><link>https://josephhsu.com/post/32746478033</link><guid>https://josephhsu.com/post/32746478033</guid><pubDate>Tue, 02 Oct 2012 11:38:00 -0700</pubDate><category>rails</category><category>API</category><category>versioning</category><category>design</category></item><item><title>Draper: decorating named scopes and relations</title><description>&lt;p&gt;In this post, I will go over a pull request I got accepted into Draper. View the &lt;a href="https://github.com/jcasimir/draper/pull/257"&gt;pull request&lt;/a&gt; and the &lt;a href="https://github.com/jcasimir/draper/pull/257/files"&gt;changes&lt;/a&gt; on Github. This post will deal with how to figure things out and also a little about the internals of draper and &lt;code&gt;ActiveRecord&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Draper is a Ruby gem that implements the Decorator Pattern and provides a convention for rails models. The decorator, in &lt;em&gt;very&lt;/em&gt; simple terms, is an instance that wraps another to provide additional behavior. In draper&amp;rsquo;s case, the decorators act as presenters for rails models.&lt;/p&gt;

&lt;h2&gt;The Pain&lt;/h2&gt;

&lt;p&gt;A coworker of mine was using draper to decorate models for use in views, but when calling a named scoped on a decorated object, it was returning an undecorated instance, which then requires you to redecorate it.&lt;/p&gt;

&lt;script src="https://gist.github.com/3746953.js?file=example_1.rb"&gt;&lt;/script&gt;

&lt;p&gt;Similarly when calling scopes on a decorated relation, it was returning a relation instead of being decorated. Thus requiring you to rewrap the collection in a decorator.&lt;/p&gt;

&lt;script src="https://gist.github.com/3746953.js?file=example_2.rb"&gt;&lt;/script&gt;

&lt;p&gt;It &lt;em&gt;feels&lt;/em&gt; like what this returns should be decorated. So, how do we approach this?&lt;/p&gt;

&lt;h2&gt;Digging into Draper&lt;/h2&gt;

&lt;p&gt;When creating a decorator, the class inherits from &lt;code&gt;Droper::Base&lt;/code&gt;, so let&amp;rsquo;s take a look at how that handles methods that we don&amp;rsquo;t explicitly define. My guess is that it uses ruby&amp;rsquo;s &lt;code&gt;method_missing&lt;/code&gt; to delegateto our model.&lt;/p&gt;

&lt;p&gt;Ah, there we are, inside of &lt;code&gt;method_missing&lt;/code&gt; we see draper checking for the basic dynamic finder methods else just call the method on the model:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if method.to_s.match(/^find_((all_|last_)?by_|or_(initialize|create)_by_).*/)
  self.decorate(model_class.send(method, *args, &amp;amp;block), :context =&amp;gt; args.dup.extract_options!)
else
  model_class.send(method, *args, &amp;amp;block)
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can see that draper does try and redecorate the instance, but only in cases when the method called matches certain finder methods. At the same time, we don&amp;rsquo;t want to decorate every method call, we want to decorate these three cases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;finder methods &amp;amp; named scopes&lt;/li&gt;
&lt;li&gt;methods that return the model&amp;rsquo;s self&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How can we ask the model these questions?&lt;/p&gt;

&lt;h2&gt;Making Draper Aware&lt;/h2&gt;

&lt;p&gt;Calling a scope on a model returns an &lt;code&gt;ActiveRecord::Relation&lt;/code&gt; instance (which you can see by calling in the console &lt;code&gt;Thing.limit(1).class&lt;/code&gt;). Rails does this to allow chaining of named scopes which allows us to delay the database call until we need it.&lt;/p&gt;

&lt;p&gt;So, based on that, we can check if we get returned the model itself or an &lt;code&gt;ActiveRecord::Relation&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;model_result.kind_of?(model_class) || 
  (defined?(ActiveRecord) &amp;amp;&amp;amp; model_result.kind_of?(ActiveRecord::Relation))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Awesome, this covers the case when we have an instance, decorate it, and call a scope on it. But now we have to handle the case of when we decorate a &lt;code&gt;ActiveRecord::Relation&lt;/code&gt;, such as &lt;code&gt;ItemDecorator.decorate(Item.limit(3))&lt;/code&gt; and then chain a scope on it.&lt;/p&gt;

&lt;p&gt;To do that, we need to modify &lt;code&gt;Draper::DecoratedEnumerableProxy&lt;/code&gt;. In this case, we check if the collection responds to the method. If it does, handle it the same way we did in &lt;code&gt;Draper::Base&lt;/code&gt;, else pass it to its super. The reason that &lt;code&gt;respond_to?&lt;/code&gt; is used is because ActiveRecord defines a custom &lt;code&gt;respond_to?&lt;/code&gt; method that handels dynamic finders and scopes.&lt;/p&gt;</description><link>https://josephhsu.com/post/31829963460</link><guid>https://josephhsu.com/post/31829963460</guid><pubDate>Wed, 26 Sep 2012 07:51:20 -0700</pubDate></item><item><title>Service Oriented Architecture (links)</title><description>&lt;p&gt;Looking to split up your app(s)? Here&amp;rsquo;s some great reads on separating into services:&lt;/p&gt;

&lt;h2&gt;Songkick&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.songkick.com/devblog/2012/07/27/service-oriented-songkick/"&gt;Service Oriented Songkick&lt;/a&gt;. Getting started with SOA and several things to consider.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.songkick.com/devblog/2012/08/02/soa-what-our-services-look-like/"&gt;SOA: What our services look like&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.songkick.com/devblog/2012/08/30/the-client-side-of-soa/"&gt;The Client Side of SOA&lt;/a&gt;. This one talks about how to move an existing app to be service oriented. A resource&amp;rsquo;s access to active record is separated into two classes, a service class and a client class.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Articles&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://rubysource.com/soa-for-the-little-guys/"&gt;SOA for the little guys&lt;/a&gt; &amp;ndash; RubySource&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Book&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Service-Oriented-Design-Addison-Wesley-Professional-Series/dp/0321659368/"&gt;Service Oriented Design with Ruby and Rails&lt;/a&gt;. Some concepts about SOA, simple ways to build services and touch on many aspects of SOA. Most examples use a small sinatra app.&lt;/li&gt;
&lt;/ul&gt;</description><link>https://josephhsu.com/post/31056460731</link><guid>https://josephhsu.com/post/31056460731</guid><pubDate>Fri, 07 Sep 2012 07:03:00 -0700</pubDate><category>soa</category><category>ruby</category><category>rails</category><category>links</category></item><item><title>Growing and staying stable (links)</title><description>&lt;p&gt;Here are some links that I found to be great reads about growing larger:&lt;/p&gt;

&lt;h2&gt;From Adam Keys:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://weblog.therealadam.com/2012/09/02/three-application-growth-stories/"&gt;http://weblog.therealadam.com/2012/09/02/three-application-growth-stories/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;From John Nunemaker:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://speakerdeck.com/u/jnunemaker/p/addicted-to-stable"&gt;https://speakerdeck.com/u/jnunemaker/p/addicted-to-stable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://speakerdeck.com/u/jnunemaker/p/mongodb-for-analytics-1"&gt;https://speakerdeck.com/u/jnunemaker/p/mongodb-for-analytics-1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;From Github:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/blog/1252-how-we-keep-github-fast"&gt;https://github.com/blog/1252-how-we-keep-github-fast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;p&gt;From these, it is obvious that building tools to monitor and handle exceptions is a must for growth.&lt;/p&gt;</description><link>https://josephhsu.com/post/31001836913</link><guid>https://josephhsu.com/post/31001836913</guid><pubDate>Thu, 06 Sep 2012 10:33:02 -0700</pubDate><category>growth</category><category>links</category></item><item><title>Launch Your Startup Idea for less than $1000 -- with Skillshare's Michael Karnjanaprakorn</title><description>&lt;p&gt;I signed up for &lt;a href="http://www.skillshare.com/Launch-Your-Startup-Idea-for-Less-than-1000/989871018"&gt;this Skillshare hybrid class&lt;/a&gt; which started tonight.&lt;/p&gt;

&lt;p&gt;Rather than focus on building the product itself, I felt that focusing on growing an idea and validating it is more important. This way I am not working on the product and making excuses to validate it.&lt;/p&gt;

&lt;hr&gt;

&lt;pre&gt;&lt;code&gt;The biggest cost to any startup is time, not money 
--steve blank
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Idea development&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Is this a problem worth solving?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Figure out the MVP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tuning the engine. Iterate. Measure. Learn. Figure out market fit.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;When pitching:&lt;/h2&gt;

&lt;p&gt;When developing your idea, pitching should be about getting feedback.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imagine giving your pitch to your idol&lt;/li&gt;
&lt;li&gt;speak 20% of the time, listen and ask questions&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;What is an MVP?&lt;/h2&gt;

&lt;p&gt;A common mistake is creating the wrong product for the wrong market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Product market fit&lt;/strong&gt;- right product for the right market&lt;/p&gt;

&lt;h2&gt;Example on figuring out an MVP for a restaurant&lt;/h2&gt;

&lt;p&gt;example biggest problem: you aren&amp;rsquo;t a cook.&lt;/p&gt;

&lt;p&gt;What is the least amount of work I can do to validate that the chicken I can cook is amazing.&lt;/p&gt;

&lt;p&gt;Level 1: host dinner at my apartment, cook fried chicken, mix it up with other fried chicken, see what friends think.&lt;/p&gt;

&lt;p&gt;Level 2: Try and rent space for a night, test with public. Set a goal for the night.&lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;User voted questions&lt;/h2&gt;

&lt;hr&gt;

&lt;h2&gt;Picking your idea&lt;/h2&gt;

&lt;p&gt;What you would like to work on for the next 5-years, what are you passionate about.&lt;/p&gt;

&lt;p&gt;Most companies make the mistake of focusing on what they are building instead of &lt;strong&gt;why&lt;/strong&gt; they are building it.&lt;/p&gt;

&lt;h2&gt;Building&lt;/h2&gt;

&lt;p&gt;Focus early on building the idea, rather than the team or product.&lt;/p&gt;

&lt;h2&gt;Idea protection&lt;/h2&gt;

&lt;p&gt;Your idea isn&amp;rsquo;t the asset, it is all about execution. The only way your idea will be successful is by sharing.&lt;/p&gt;

&lt;h2&gt;Finding a (technical) co-founder&lt;/h2&gt;

&lt;p&gt;Easier when the idea is solid. Validate idea then build the team.&lt;/p&gt;

&lt;h2&gt;How to deal with harsh feedback&lt;/h2&gt;

&lt;p&gt;When building your idea, flaws will be exposed. Look for the feedback and filter what flaws can be addressed. For example, Skillshare had trouble with people who could not teach well, they started teaching people how to teach and hold classes.&lt;/p&gt;

&lt;h2&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://venturehacks.com/pitching"&gt;Pitching&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>https://josephhsu.com/post/29863572728</link><guid>https://josephhsu.com/post/29863572728</guid><pubDate>Mon, 20 Aug 2012 17:45:01 -0700</pubDate><category>startup</category><category>skillshare</category></item></channel></rss>
