Open Side Menu Go to the Top

04-05-2014 , 08:14 AM
That helps a ton! Thankyou pal. Explained well
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
04-05-2014 , 10:01 AM
The storyboard feature of xcode is pretty cool. I've been learning some objective c and playing around with some simple apps using xcode. I think once I get the hang of it I'm going to move back to rubymotion.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 12:58 PM
Quote:
Originally Posted by Nchabazam
The storyboard feature of xcode is pretty cool. I've been learning some objective c and playing around with some simple apps using xcode. I think once I get the hang of it I'm going to move back to rubymotion.
I found it kind of awkward but I never got a really good sense of how to use it for non-trivial things.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 06:50 PM
Seriously awesome discovery. There's apparently a million ways to create comment systems, but the closure table is simply incredible, powerful, and elagant:

Copy / pasted (somewhat) from PgAdmin. It's interesting to see how much extra code is generated by PostgreSQL:

Code:
CREATE TABLE comments
(
  cid serial NOT NULL,
  handle character varying,
  title character varying,
  comment character varying,
  cdate date DEFAULT ('now'::text)::date,
  CONSTRAINT comments_pkey PRIMARY KEY (cid)
)

CREATE TABLE commentpaths
(
  ancestor integer NOT NULL,
  descendant integer NOT NULL,
  CONSTRAINT commentpaths_pkey PRIMARY KEY (ancestor, descendant),
  CONSTRAINT commentpaths_ancestor_fkey FOREIGN KEY (ancestor)
      REFERENCES comments (cid) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT commentpaths_descendant_fkey FOREIGN KEY (descendant)
      REFERENCES comments (cid) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
Holy ****.

What kind of people come up with this stuff? Two little tables creates a complext graphing system that is extensible, infinite, powerful, modifiable and adhears to referential integrity constraints.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 07:38 PM
why do you need descendents? can't it be inferred from ancestor?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 07:46 PM
usually with hierarchies whenever someone deviates from a schema that just has a parent ID it's a denormalization for performance reasons.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 07:52 PM
Quote:
Originally Posted by gaming_mouse
why do you need descendents? can't it be inferred from ancestor?
Yes, but you run into problems when you go N-depth.

The genius of the closure table is that everything is an ancestor, even to itself:



To use the table, you'd have something like this:

Code:
insert into commentpaths values 
(1, 1),
(1, 2),
(2, 2),
(2, 3),
(1, 3),
(3, 3);
Thus query as > n gets all the comments from that part of the tree.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2014 , 08:39 PM
Has anyone messed around with PostGIS? Looks pretty cool so far, but I haven't done much with it yet.

Planning to get much deeper into database stuff. I've been planning to get this open-source marketing program put together. Seems like it'd be a great opportunity to learn a bit of PL/PgSQL.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2014 , 11:09 PM
Has anyone in here used Parse?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2014 , 11:45 PM
I'm sort of confused by Parse and similar services. I've looked at them briefly, but I always end up wondering what you are supposed to do with an app that has any significant business logic on the server side. Where does it go? It seems like it might be good for a simple app where you are just saving users and doing simply queries...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 12:41 AM
Quote:
Originally Posted by gaming_mouse
I'm sort of confused by Parse and similar services. I've looked at them briefly, but I always end up wondering what you are supposed to do with an app that has any significant business logic on the server side. Where does it go? It seems like it might be good for a simple app where you are just saving users and doing simply queries...
I'll let you know when I get there. They do have something called Cloud Code.
https://parse.com/docs/cloud_code_guide

Right now I am just trying to figure out how to retrieve a bunch of data from javascript on a website without allowing just anybody to change that data.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 12:51 AM
honestly, at that point why not just write your own API in the framework you're already familiar with and host on heroku. Seems like about the same level of convenience with a lot more control. Maybe I don't get it though....
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 12:59 AM
Wow. That is a metric ton of documentation. I guess I get, but still.

g_m: that is the second time you suggested someone roll their own API for stuff. I'm intrigued.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:24 AM
Quote:
Originally Posted by gaming_mouse
honestly, at that point why not just write your own API in the framework you're already familiar with and host on heroku. Seems like about the same level of convenience with a lot more control. Maybe I don't get it though....
With Parse's SDK it only takes about 4 lines of code to save the object to the cloud DB. I don't have to do any threading. I don't have to handle cases where the user isn't in cell phone range, etc. I just type
Code:
SomeParseObject obj = new SomeParseObject();
obj.setName("xyz");
obj.setType("abc");
obj.saveEventually();
That's it. Now I assume it's about as easy on the JS retrieval side from a webpage. Seems easier than creating an API on heroku.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:28 AM
Quote:
Originally Posted by daveT
g_m: that is the second time you suggested someone roll their own API for stuff. I'm intrigued.
Well with pretty much any modern framework, setting up APIs for basic CRUD stuff is out of the box, and learning it can't be much harder than learning Parse. Heroku would take care of you for server management... so the combo of those two things means I'm not really sure what I get out of Parse. I guess you don't even have to figure out how to add on a db to heroku, and I guess your db stuff scales automatically? But then how are you unit testing your business logic? Just talking out my ass though, I've never used them.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:33 AM
Yeah, but you also suggested that I build an API for site searching instead of working with Elastic Search.

Just wondering where all that comes from.

Seems like the problems are hard either way, just a matter of where the mess is located.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:37 AM
Quote:
Originally Posted by maxtower
With Parse's SDK it only takes about 4 lines of code to save the object to the cloud DB. I don't have to do any threading. I don't have to handle cases where the user isn't in cell phone range, etc. I just type
Code:
SomeParseObject obj = new SomeParseObject();
obj.setName("xyz");
obj.setType("abc");
obj.saveEventually();
That's it. Now I assume it's about as easy on the JS retrieval side from a webpage. Seems easier than creating an API on heroku.
If that's all you're doing, sure. But there's not business logic there.

What if you have a referral system, and upon saving a user you need to check if he email was referred by someone else, and if it was send a thank you email to the referer, and also a welcome email to the new user. and also, if this is the 5th referred person for the referer, then the email sent to him should include a free promo code for X, where X is one of your promotional items that has not already been claimed 10 times, and whose dollar value is at least $5 but not more than $10, etc, etc.

All that **** that I know how to design and architect already in ruby/sinatra or whatever, do I figure out how to do that in the Parse Cloud thingy? Can I program plain unit-testable business objects that I can just plugin there? Or am I tied to their framework at every turn? (that's what i'd expect)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:40 AM
Quote:
Originally Posted by daveT
Yeah, but you also suggested that I build an API for site searching instead of working with Elastic Search.

Just wondering where all that comes from.

Seems like the problems are hard either way, just a matter of where the mess is located.
I believe I *asked* why I wouldn't, since I was trying to understand what elastic search provides, and you are or someone gave a good answer. It comes from wanting to know what advantage one thing has over another.

In most cases, when choosing between two messes, one mess is much worse than the other ime.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 01:49 AM
Quote:
Originally Posted by gaming_mouse
If that's all you're doing, sure. But there's not business logic there.

What if you have a referral system, and upon saving a user you need to check if he email was referred by someone else, and if it was send a thank you email to the referer, and also a welcome email to the new user. and also, if this is the 5th referred person for the referer, then the email sent to him should include a free promo code for X, where X is one of your promotional items that has not already been claimed 10 times, and whose dollar value is at least $5 but not more than $10, etc, etc.

All that **** that I know how to design and architect already in ruby/sinatra or whatever, do I figure out how to do that in the Parse Cloud thingy? Can I program plain unit-testable business objects that I can just plugin there? Or am I tied to their framework at every turn? (that's what i'd expect)
All I need right now is the data storage. Whatever makes your life easier, you should use. I am still learning about this, so it's entirely possible I will have to move to some other solution soon.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 02:00 AM
Quote:
Originally Posted by maxtower
All I need right now is the data storage. Whatever makes your life easier, you should use. I am still learning about this, so it's entirely possible I will have to move to some other solution soon.
and possible i'm just not getting it and they have answers to all my supposed problems.... anyway, i'm sure it saves time for apps doing simple CRUD stuff, so good luck
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 03:05 AM
Just saw this posted on HN, seems relevant to the current discussion:
If You Are Designing Your Own REST backend You're Doing It Wrong
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 06:52 AM
I'm not sure if I'm just groggy still but it doesn't seem like he's saying much. It seemed like one of those blogs designed for hits - I'm going to say something really controversial in the title but then not really back my argument up in my article.

Compare that to something like a Steve Yegge post and it's a tiny fraction of the size. And that's because there doesn't seem to be any of the hard substance behind any of his statements.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 10:43 AM
Quote:
Originally Posted by clowntable
Just saw this posted on HN, seems relevant to the current discussion:
If You Are Designing Your Own REST backend You're Doing It Wrong
i read that too and i confess i didn't really follow what he was saying...
1. i haven't used couchdb
2. at what kind of scale do his comments come into play? it seems like he's talking about pretty massive traffic, like hundreds of thousands of hits per second, but again, i didn't completely follow
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 11:01 AM
Quote:
Originally Posted by gaming_mouse
i read that too and i confess i didn't really follow what he was saying...
1. i haven't used couchdb
2. at what kind of scale do his comments come into play? it seems like he's talking about pretty massive traffic, like hundreds of thousands of hits per second, but again, i didn't completely follow
I had the same thoughts.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2014 , 11:55 AM
He has a rough point but it mostly strikes me as a CouchDB-fanboy post. I agree it's pretty confusing as well. Wish I hadn't posted it :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m