Profile

Cover photo
Jesse Armand
Works at 2359 Media
Attended Institut Teknologi Bandung
55 followers|12,835 views
AboutPostsPhotosYouTube+1's

Stream

Jesse Armand

Shared publicly  - 
 
FP and swift
 
This month tech editor Alexis Gallagher will be presenting his talk "Swift, functional programming, and the future of Objective-C". Apple’s new programming language, Swift, is one of the most exciting developments on the platform in years. It’s full of new ideas.  But Apple, in its usual style, is rather coy about where those ideas are coming from. In fact, Swift seems to be significantly influenced by functional programming languages. Many of Swift’s new features appeared first in the old functional programming languages, and exist to support programming in a more functional style.  

In this talk, Alexis will discuss what’s new in Swift and where it is coming from. Is Swift a functional programming language? Will Apple start encouraging us to write in a functional style, instead of an object-oriented style? Does this mean Objective-C is going away? Will this make it easier, or harder, for people just starting out with the platform? And what really is functional programming anyway — what’s it good for, and what’s it bad for?

Alexis Gallagher has been working with math and computers for over a decade—in finance (adding risk analytics to the risk engine for Deutsche Bank's FX options trading system), in research science (big data bioinformatics at Oxford), and in mobile (leading development on high-polish presentation apps at McKinsey & Co). He loves iOS because it combines computing and design, and it's a kind of computing that you can see and touch. You can find him on twitter at @alexisgallagher.

This talk will be live, so bring your questions!
This Hangout On Air is hosted by Ray Wenderlich. The live video broadcast will begin soon.
Q&A
Preview
Live
November 2014 Tech Talk: Swift, Functional Programming, and the Future of Objective-C
Tue, November 11, 2014, 2:00 PM
Hangouts On Air - Broadcast for free

3 comments on original post
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
First YouTube ad that made me stay and watch
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
Nice group started by Jens Alfke
Swift Language. Welcome! Feel free to subscribe if you want to talk (or just listen) about the Swift programming language. (It's OK to talk about the language, its manual, and even material discussed in sessions at WWDC. Apple has lifted its NDA for WWDC content.) ...
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
😆 
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
 
I think if you look at this animation and think about it long enough, you’ll understand:

* Why circles and right-angle triangles and angles are all related
* Why sine is opposite over hypotenuse and so on
* Why cosine is simply sine but offset by pi/2 radians

via http://scienceisbeauty.tumblr.com/post/82465753340/one-of-the-answers-to-the-topic-visually-stunning
69 comments on original post
1
Add a comment...
Have him in circles
55 people
alpis al's profile photo
om arum's profile photo
Ganidu Rochana's profile photo
rifki herliyadi's profile photo
Yudi Koko's profile photo
Jared Zhang's profile photo
King “Kittiphit” Lee's profile photo
Tanjong Pagar Meditation, Singapore's profile photo
aminulloh anwar's profile photo

Jesse Armand

Shared publicly  - 
 
 
"Should I use MongoDB or CouchDB (or Redis)?"
------------------------------------------------------

I see this question asked a lot online. Fortunately, once you get familiar enough with each of the NoSQL solutions and their ins and outs, strengths and weaknesses, it becomes much clearer when you would use one over the other.

From the outside, so many of them look the same, especially Mongo and Couch. Below I will try and break down the big tie-breakers that will help you decide between them.



Mongo
========================
[**] Querying - If you need the ability to dynamically query your data like SQL, MongoDB provides a query syntax that will feel very similar to you. CouchDB is getting a query language in the form of UNQL in the next year or so, but it is very much under development and we have no knowledge of the impact on view generation and query speed it will have yet, so I cannot recommend this yet.

[**] Master-Slave Replication ONLY - MongoDB provides (great) support for master-slave replication across the members of what they call a "replica set". Unfortunately you can only write to the master in the set and read from all.

If you need multiple masters in a Mongo environment, you have to set up sharding in addition to replica sets and each shard will be its own replica set with the ability to write to each master in each set. Unfortunately this leads to much more complex setups and you cannot have every server have a full copy of the data set (which can be handy/critical for some geographically dispersed systems - like a CDN or DNS service).

[**] Read Performance - Mongo employs a custom binary protocol (and format) providing at least a magnitude times faster reads than CouchDB at the moment. There is work in the CouchDB community to try and add a binary format support in addition to JSON, but it will still be communicated over HTTP.

[**] Provides speed-oriented operations like upserts and update-in-place mechanics in the database.



CouchDB
========================
[**] Master-Master Replication - Because of the append-only style of commits Couch does every modification to the DB is considered a revision making conflicts during replication much less likely and allowing for some awesome master-master replication or what Cassandra calls a "ring" of servers all bi-directionally replicating to each other. It can even look more like a fully connected graph of replication rules.

[**] Reliability of the actual data store backing the DB. Because CouchDB records any changes as a "revision" to a document and appends them to the DB file on disk, the file can be copied or snapshotted at any time even while the DB is running and you don't have to worry about corruption. It is a really resilient method of storage.

[**] Replication also supports filtering or selective replication by way of filters that live inside the receiving server and help it decide if it wants a doc or not from another server's changes stream (very cool).

Using an EC2 deployment as an example, you can have a US-WEST db replicate to US-EAST, but only have it replicate items that meet some criteria. like the most-read stories for the day or something so your east-coast mirror is just a cache of the most important stories that are likely getting hit from that region and you leave the long-tail (less popular) stories just on the west coast server.

Another example of this is say you use CouchDB to store data about your Android game in the app store that everyone around the world plays. Say you have 5 million registered users, but only 100k of them play regularly. Say that you want to duplicate the most active accounts to 10 other servers around the globe, so the users that play all the time get really fast response times when they login and update scores or something. You could have a big CouchDB setup in the west code, and then much smaller/cheaper ones spread out across the world in a few disparate VPS servers that all use a filtered replication from your west coast master to only duplicate the most active players.

[**] Mobile platform support. CouchDB actually has installs for iOS and Android. When you combine the ability to run Couch on your mobile devices AND have it bidirectionally sync back to a master DB when it is online and just hold the results when it is offline, it is an awesome combination.

[**] Queries are written using map-reduce functions. If you are coming from SQL this is a really odd paradigm at first, but it will click relatively quickly and when it does you'll see some beauty to it. These are some of the best slides describing the map-reduce functionality in couch I've read:
http://www.slideshare.net/gabriele.lana/couchdb-vs-mongodb-2982288

[**] Every mutation to the data in the database is considered a "revision" and creates a duplicate of the doc. This is excellent for redundancy and conflict resolution but makes the data store bigger on disk. Compaction is what removes these old revisions.

[**] HTTP REST JSON interaction only. No binary protocol (yet - vote for http://ubjson.org support), everything is callable and testable from the command line with curl or your browser. Very easy to work with.



These are the biggest features, I would say if you need dynamic query support or raw speed is critical, then Mongo. If you need master-master replication or sexy client-server replication for a mobile app that syncs with a master server every time it comes online, then you have to pick Couch. At the root these are the sort of "deal maker/breaker" divides.

Fortunately once you have your requirements well defined, selecting the right NoSQL data store becomes really easy. If your data set isn't that stringent on its requirements, then you have to look at secondary features of the data stores to see if one speaks to you... for example, do you like that CouchDB only speaks in raw JSON and HTTP which makes it trivial to test/interact with it from the command line? Maybe you hate the idea of compaction or map-reduce, ok then use Mongo. Maybe you fundamentally like the design of one over the other, etc.etc.

If anyone has questions about Redis or others, let me know and I'll expand on how those fit into this picture.




ADDENDUM: Redis
========================
You hear Redis described a lot as a "data structure" server, and if you are like me this meant nothing to you for the longest time until you sat down and actually used Redis, then it probably clicked.

If you have a problem you are trying to solve that would be solved really elegantly with a List, Set, Hash or Sorted Set you need to take a look at Redis. The query model is simple, but there are a ton of operations on each of the data structure types that allow you to use them in really robust ways... like checking the union between two sets, or getting the members of a hash value or using the Redis server itself as a sub/pub traffic router (yea, it supports that!)

Redis is not a DB in the classic sense. If you are trying to decide between MySQL and MongoDB because of the dynamic query model, Redis is not the right choice. In order to map you data to the simple name/value structure in Redis and the simplified query approach, you are going to spend a significant amount of time trying to mentally model that data inside of Redis which typically requires a lot of denormalization.

If you are trying to deploy a robust caching solution for your app and memcache is too simple, Redis is probably perfect.

If you are working on a queuing system or a messaging system... chances are Redis is probably perfect.

If you have a jobs server that grinds through prioritized jobs and you have any number of nodes in your network submitting work to the job server constantly along with a priority, look no further, Redis is the perfect fit. Not only can you use simple Sorted Sets for this, but the performance will be fantastic (binary protocol) AND you get the added win of the database-esque features Redis has like append only logging and flushing changes to disk as well as replication if you ever grew your jobs server beyond a single node.


NOTE: Redis clustering has been in the works for a long time now. Salvatore has been doing some awesome work with it and it is getting close to launch so if you have a particularly huge node distribute and want a robust/fast processing cluster based on Redis, you should be able to set that up soon.


Redis has some of these more classic database features, but it is not targeted at competing with Mongo or Couch or MySQL. It really is a robust, in-memory data structure server AND if you happen to need very well defined data structures to solve your problem, then Redis is the tool you want. If your data is inherently "document" like in nature, sticking it in a document store like Mongo or CouchDB may just make a lot more mental-model sense for you.


NOTE: I wouldn't underestimate how important mentally understanding your data model is. Look at Redis, and if you are having a hard time mapping your data to a List, Set or Hash you probably shouldn't use it. Also note that you WILL use many more data structures than you might realize and it may feel odd... for example a twitter app may have a single user as a hash, and then they might have a number of lists of all the people they follow and follow them -- you would need this duplication to make querying in either direction fast. This was one of the hardest or most unnatural things I experienced when trying to solve more "classic DB" problems with Redis and what helped me decide when to use it and when not to use it.


I would say that Redis compliments most systems (whether it is a classic SQL or NoSQL deployment) wonderfully in most cases in a caching capacity or queue capacity.

If you are working on a simple application that just needs to store and retrieve simple values really quickly, then Redis is a perfectly valid fit. For example, if you were working on a high performance algorithmic trading and you were pulling ticker prices out of a firehose and needing to store them at an insane rate so they could be processed, Redis is exactly the kind of datastore you would want to turn to for that -- definitely not Mongo, Couch or MySQL.

IMPORTANT: Redis's does not have a great solution to operating in environments where the data set is bigger than ram and as of right now solutions for "data bigger than ram" has been abandoned. For the longest time this was one of the gripes with Redis and Salvatore (http://twitter.com/#!/antirez) solved this problem with the VM approach. This was quickly deprecated by the diskstore approach after some reported failures and unhappiness with how VM was behaving.

Last I read (a month ago?) was that Salvatore wasn't entirely happy with how diskstore turned out either and that attempts should really be made to keep Redis's data set entirely in memory when possible for the best experience.

I say this not because it is impossible, but just to be aware of the "preferred" way to use Redis so if you have a 100GB data set and were thinking of throwing it on a machine with 4GB of ram, you probably don't want to do that. It may not perform or behave like you want it to.

ADDENDUM: I answered the question about Couch vs Mongo again on Quora with some more tech details if you are interested:
http://www.quora.com/How-does-MongoDB-compare-to-CouchDB-What-are-the-advantages-and-disadvantages-of-each/answer/Riyad-Kalla
53 comments on original post
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
 
Learn more about what makes Apple tick in this episode of Slices of Apple
View original post
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
Dynamic Programming, recently became my favourite topic, and my favourite lecture at OCW.
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
 
I guess you had to be there. 
3 comments on original post
1
Add a comment...

Jesse Armand

Shared publicly  - 
1
Add a comment...

Jesse Armand

Shared publicly  - 
 
 
Bener
The "class reunion" is actually just an opportunity to gauge how far we've come in comparison to our old classmates. Who beat the expectations? Who flopped under pressure? Whose goals were achieved and whose went straight down the toilet? W...
View original post
1
Add a comment...
People
Have him in circles
55 people
alpis al's profile photo
om arum's profile photo
Ganidu Rochana's profile photo
rifki herliyadi's profile photo
Yudi Koko's profile photo
Jared Zhang's profile photo
King “Kittiphit” Lee's profile photo
Tanjong Pagar Meditation, Singapore's profile photo
aminulloh anwar's profile photo
Work
Occupation
Software Engineer
Skills
iOS, Mac OS X, Cocoa, Objective-C, git
Employment
  • 2359 Media
    Software Engineer, 2011 - present
  • Cartomapic
    iOS Apps Developer, 2010 - 2011
  • barablu
    Software Developer, 2006 - 2008
Basic Information
Gender
Male
Story
Introduction
I've been doing Cocoa, Objective-C and iOS since the iPhone SDK was released. I'm also looking into software design, Mac desktop apps development, web apps, functional programming.
Education
  • Institut Teknologi Bandung
    Computer and Control Systems, 2002 - 2006
Contact Information
Work
Email
Address
43B Tanjong Pagar Road
Jesse Armand's +1's are the things they like, agree with, or want to recommend.
Swift Language - Google Groups
groups.google.com

Swift Language. Welcome! Feel free to subscribe if you want to talk (or just listen) about the Swift programming language. (It's OK to talk

PandoMonthly San Francisco with GitHub CEO Tom Preston-Werner, the full ...
pandodaily.com

GitHub CEO Tom Preston-Werner took the stage for our latest PandoMonthly San Francisco event on Thursday, where he talked about his Midweste

Redmond Pie
plus.google.com

Covering Microsoft, Google, Apple and the WWW.

geekcamp / Frank
geekcamp.pbworks.com

Insert links. Insert links to other pages or uploaded files. Pages Images and files. Insert a link to a new page. Loading... No images or fi

Mac OS X 10.7 Lion: the Ars Technica review
arstechnica.com

Mac OS X 10.7 Lion is no shrinking violet. Unlike its predecessor, Snow Leopard, which concentrated on internal changes, Lion aims to remake

geekcamp / Frank
geekcamp.pbworks.com

Insert links. Insert links to other pages or uploaded files. Pages Images and files. Insert a link to a new page. Loading... No images or fi

Engadget Primed: The crazy science of GPU compute
www.engadget.com

Primed goes in-depth on the technobabble you hear on Engadget every day -- we dig deep into each topic's history and how it benefits our liv

How To Create a Simple Magazine App with Core Text | Ray Wenderlich
www.raywenderlich.com

This is a blog post by iOS Tutorial Team member Marin Todorov, a software developer with 12+ years of experience, an independant iOS develop

JSON implementation for Ruby (Redirect)
json.rubyforge.org

If you aren't redirected, click here.

Amazon Kindle Fire HD 8.9-inch
www.engadget.com

As neat as the Kindle Fire HD already is, just a few dinky tweaks could turn it into so much more -- a platform for true physics-based gamin

zxing
code.google.com

Multi-format 1D/2D barcode image processing library with clients for Android, Java

Dangerous Minds | CAPTCHAs to keep idiots out of comment threads
www.dangerousminds.net

  Check it out! It’s like a CAPTCHA IQ test. If Fox Nation implemented something like this, they’d have zero commenters (unless, of cours

MeachWare Dev Blog: Speed up Xcode 4
meachware.blogspot.com

Speed up Xcode 4. Love it or hate it... Xcode 4 is here to stay... Browsing the Apple forums I happened upon a post with the most excellent

ruby on rails - How to change values overriding the 'to_json' method? - ...
stackoverflow.com

up vote 1 down vote favorite. I am using Ruby on Rails 3 and I would like to override the to_json method. At this time I use the following c

ruby on rails - Override as_json or to_json model class name - Stack Ove...
stackoverflow.com

up vote 0 down vote favorite. I'd like to modify the classname when calling to_json on an AR model. ie. Book.first.to_json #=> "

json - Override to_json in Rails 2.3.5 - Stack Overflow
stackoverflow.com

Update: This issue was not properly explored. The real issue lies within render :json . The first code paste in the original question will y

MySQL and Unicode
mzsanford.wordpress.com

I used MySQL for a great many projects over the years with the assumption that a charset of utf8 and a collation of utf8_unicode_ci was goin

That Didn't Take Long: Spotify Sued For Patent Infringement Just Weeks A...
www.techdirt.com

Hello Spotify. Welcome to America, where if you do anything even remotely innovative, you get sued for patent infringement. Indeed, just a

Mention @somebody. They're notified. - GitHub
github.com

Also, subscribe to issues and pull requests.

Saving John Siracusa’s massive Lion review to Instapaper – Marco.org
www.marco.org

Marco.org. I'm Marco Arment: creator of Instapaper, amateur tech writer, and coffee enthusiast. About • Twitter • RSS Some of my favorit