Open Side Menu Go to the Top

04-10-2012 , 08:34 PM
Spent all day trying to implement AJAX into my php/sql tables and failed. Pretty tilting.
** 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-10-2012 , 09:45 PM
Anyone else see this http://www.meteor.com/screencast? Very cool new client/server js framework.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-10-2012 , 10:01 PM
Quote:
Originally Posted by Neko
Anyone else see this http://www.meteor.com/screencast? Very cool new client/server js framework.
wow this looks awesome. so would this be something you used instead of ember or backbone? was a little confused as they mentioned using backbone together with meteor in the vid.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-10-2012 , 11:20 PM
g_m,

some dudes at work were talking about this (i haven't read anything) but it sounds like a large chunk of that $1B is in fb stock, which is both 1. a lot cheaper for fb to give out than cash and 2. likely has a current market value significantly greater than its actual value.

neko,

why would you ever want to use someone else's javascript framework? don't you know how easy it is to roll your own?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-10-2012 , 11:40 PM
Quote:
Originally Posted by gaming_mouse
wow this looks awesome. so would this be something you used instead of ember or backbone? was a little confused as they mentioned using backbone together with meteor in the vid.
I've never used backbone/ember before but I think you'd use meteor for doing the talking between client & server and backbone for rendering templates etc on the client side. Not totally clear to me though.

Quote:
Originally Posted by tyler_cracker
why would you ever want to use someone else's javascript framework? don't you know how easy it is to roll your own?
I am a quiche eater (as evidence to this fact I spent years of my life programming in MORTRAN discussed in the previously linked essay)

Spoiler:

oblig xkcd

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 08:28 AM
Quote:
Originally Posted by tyler_cracker
neko,

why would you ever want to use someone else's javascript framework? don't you know how easy it is to roll your own?
Troll much?

Anyways, I really enjoy using my 9.5k of Javascript which does the following:

1. Fully works in any major browser/mobile device, and goes as far back as supporting IE 6.
2. Selector engine that's faster than jquery's.
3. DOM manipulating that's on par with jquery's features but way less bloated.
4. Event manager that has enough functionality that I haven't needed more.
5. Fully featured XHRs (all http verbs, jsonp, etc.).

Oh the best part is I didn't write a single line of code and the libs I use are all well maintained. I also can keep track and update them together or 1 at a time by typing 1 command and have the option to mix/match components whenever I want.

---

Also meteor seems fun but it's hardly new. There are other node.js projects that combine libraries to form an app and the idea of RPCs (clients making calls on a server, etc.) has been around since node.js has been around.

They just decided to wrap it all together and give people the whole package.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 08:51 AM
Quote:
Originally Posted by Shoe Lace
Oh the best part is I didn't write a single line of code and the libs I use are all well maintained. I also can keep track and update them together or 1 at a time by typing 1 command and have the option to mix/match components whenever I want.
Quote:
So I fell to my knees and I cried out to the Lord "Why have you forsaken us? The world is awash in wasted kilobytes and ms. The wasted time has left many great art works unfinished for lack of time for that one last half stroke of the brush."

And an angel of the Lord appeared and said "Finally, someone worthy of the ultimate JS software". And in my hands appeared The Holy USB Key. So I ran to my computer, inserted it, and watched as the most beautiful code I've ever seen washed over the screen. I sat for hours with tears streaming down my face at having been given this opportunity to behold concise-greatness.*
And here ends today's reading of the book of Shoe Lace.



*And even here it was longer dev effort because of all the time crying at how beautiful the code was.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 09:34 AM
Untill the end of the year I will go on an "expand your programming horizon" bender of sorts. Planning to code a ton. Here's my TODO list:

1) Get a lot better at writing stuff in Ruby and TDD/BDD. At the end of the day I want to be able to call myself a pretty good Ruby programmer.
This may or may not involve some Rails stuff, step one will be finishing my game.
I also want to use JRuby in the future for a couple of reasons.
Project: Adventure game in Ruby (using Rubygame)

2) Master Prolog. I can write simple, standard academic stuff but I really want to get good at it. Work through "Art of Prolog" and "Craft of Prolog". Use the different constraint libraries.
One of the reasons why I want to do JRuby in step 1 is that there's already a bunch of stuff for interfacing Java and different Prolog "dialects". I think porting the Python bridge I found to Ruby would be an option as well but I'd rather not do it.
Project: I have a couple of ideas but probably something like a work sheduler combining Prolog constraints and a Ruby based UI

3) No way around Erlang. I don't know how I'll learn it yet but I know I want to learn it.
Project: A game server of sorts (possibly poker but I'm also huge fan of boardgames so maybe some boardgame clones or smth), wxWindows based UI in Ruby
Could also mixin #2 try to build some Prolog based bots for the game I chose

I think it's important to have concrete projects so that you can measure your failure/success in getting stuff done. I'll be swamped with other stuff untill roughly the middle of may but after that I should have reasonable time to not have any excuses.

Just posting this so I can look back at it and see if I did what I wanted.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 11:47 AM
shoe,

sounds pretty impressive! maybe you should release it as a framework.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 12:14 PM
@tyler,
Why would I do that? The tool I'm using is open source and it's already been out there for months. The concept of mix/matching components has been around since before jquery was even out too.

It was just slightly more annoying to setup (you had to cat a few files together and run them through a compressor yourself to minimize the combined file if you cared about performance), you also had to manually find the libs but that's a piece of cake today too even if you don't use the command line tool to do the dirty work for you.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 12:14 PM
so meteor is released under a GPL license... this means you cannot use it to create a commercial app, right?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 12:19 PM
Quote:
Originally Posted by Shoe Lace
@tyler,
Why would I do that? The tool I'm using is open source and it's already been out there for months. The concept of mix/matching components has been around since before jquery was even out too.

It was just slightly more annoying to setup (you had to cat a few files together and run them through a compressor yourself to minimize the combined file if you cared about performance), you also had to manually find the libs but that's a piece of cake today too even if you don't use the command line tool to do the dirty work for you.
What libraries are you using?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 12:30 PM
Quote:
Originally Posted by jjshabado
What libraries are you using?
Does it matter which libs I use? Also I thought I'm non-productive and must be crazy to consider not using jquery?

Now you're asking for help? Interesting.

Well since I'm not a complete jerk, the libs I use are located on http://www.microjs.com. I'm sort of a jerk by not saying which ones I use but for the time being I'll let you figure out which ones. You can do the research!

You will likely need: #2, 3, 4, and 5 from my list in the previous post. If you want to drop IE < 9 then you can probably get away with only needing #4 and 5 and use queryselector/queryselectorall.

http://caniuse.com/queryselector is pretty damn strong and well supported but since IE 8 is half way ******ed with it, you will probably want to use something that normalizes the dom if you care about IE 6-8.

Edit:
To be less of a jerk.... in case you're not aware, http://jsperf.com/ is a good site to use to benchmark your tests and http://jsfiddle.net/ is a good site to write up tests. You can also link directly to github files in both sites. Just make sure you link to the raw file and not the blob.

This means you can fool around with, test, and benchmark everything on microjs.com without having to download anything. Trust me, it saves a lot of time.

Last edited by Shoe Lace; 04-11-2012 at 12:39 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 12:55 PM
Quote:
Originally Posted by Shoe Lace
Does it matter which libs I use? Also I thought I'm non-productive and must be crazy to consider not using jquery?

Now you're asking for help? Interesting.
Lol, not at all. If you've actually accomplished what you said, I think its interesting. Definitely worth a thread talking about what you've done, why, and how much work it took you. But in general, you're setting off my bull**** detector. Here's why:

Quote:
Originally Posted by Shoe Lace
There are too many browser incompatibilities to deal with to make ajax'ified pages the next big thing and by the time all of them are ironed out we won't even be using http anymore to serve content (or even access sites perhaps).
So we start with the idea that browser incompatibilities are a big problem.

Quote:
Originally Posted by Shoe Lace
Backbone+Underscore (backbone depends on underscore) weighs about 10k.
Ember weighs about 40k.

What makes ember so much better than backbone and why does it need 4x the amount of code to do basically the same thing as BB?
Then you bring up saving 30K. This makes me thing you don't really know how to decide what's important in development.

Quote:
Originally Posted by Shoe Lace
When I see something with a monster footprint it just makes me think "why the heck is it so big?".

When I compare 10k to 40k my thought process is basically this:

I'm about 30% concerned with...
"If people download my ember app they might have to wait 120ms more for the initial page load.".

I'm about 70% concerned with...
"From a technical POV why does it take 40k to do what something else can do in about 10k (or a little bit more if you need some BB plugins to match the functionality of ember).".
Again, you focus on a few dozen kb and ms.

Quote:
Originally Posted by Shoe Lace
When you're dealing with a larger code base, you're dealing with more moving parts and more chances of errors. You're dealing with more chances of things going wrong and more chances of something being inefficient/bottleneck.
Now you go off on using lots of different depdencies.

Quote:
Originally Posted by Shoe Lace
You have a site that's pretty popular and you get 2 million uniques a month. You're hosted on the cloud so you're paying for cpu cycles and BW as it's used. You have a little javascript usage but not a ton. You update some content with ajax and offer a few neat snippets of functionality that makes the UX better.

Traffic distribution is heavily weighted towards desktop browsers but at least 20% of your traffic comes from mobile devices and you assume in the future that % is going to grow.

Would you rather A:

Spend a day or 2 (once) rolling your own light weight solution that gives you IE 8+ / A grade browsers full cross browser support for everything you do on the page.

Or B:

Mindlessly download some massive library because "everyone else does" and offers no benefit at all other than saving you a few hours once. However it introduces a ton of unknown negatives over the long haul of your site.
You seem to think rolling your own solution is good.

Quote:
Originally Posted by Shoe Lace
Now you have like 8 dependencies to work with and you're trusting that some random dude who wrote that image gallery you're using actually knows what he's doing.
Again, you're railing against libraries.

Quote:
Originally Posted by Shoe Lace
How is this not a negative or less of a negative than doing it yourself? I think you have some of your points reversed. You say that writing your own solution means your site needs to stay the same. It's actually the reverse.

If you want to change your site and it depends on 8 different plugins and multiple third party frameworks then you have to make sure the changes you make still work with that entire dependency chain. Then you have to deal with versions too.
More railing against libraries.

Quote:
Originally Posted by Shoe Lace
@everyone,
If a dev can't understand regular javascript and how the DOM operates then I don't want him within 1,000 miles of my business/code. Why on earth would you hire a front end developer who doesn't know anything about what he's working with other than how to Google pre-built jquery solutions that were written by unknowns?
Here you're talking about the joys of writing your own raw javascript.

Quote:
Originally Posted by Shoe Lace
Anyways, I really enjoy using my 9.5k of Javascript which does the following:

1. Fully works in any major browser/mobile device, and goes as far back as supporting IE 6.
2. Selector engine that's faster than jquery's.
3. DOM manipulating that's on par with jquery's features but way less bloated.
4. Event manager that has enough functionality that I haven't needed more.
5. Fully featured XHRs (all http verbs, jsonp, etc.).

Oh the best part is I didn't write a single line of code and the libs I use are all well maintained. I also can keep track and update them together or 1 at a time by typing 1 command and have the option to mix/match components whenever I want.
Now all of a sudden you use multiple libraries, haven't written any javascript, and don't have any problems with browser incompatibilities. This whole discussion seems like it would have been different if you actually had this. Not to mention that you won't actually give the simple list of what libraries you use... which seems pretty weird for someone that's made this many posts on the topic.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:03 PM
Quote:
Originally Posted by gaming_mouse
so meteor is released under a GPL license... this means you cannot use it to create a commercial app, right?
This is all hazy and from memory. It depends which version of the GPL you use.
I *think* v2 is the most "commercial software" friendly.

This is more concrete - you can of course use any GPL code in commercial software. If you modify the GPL code you have to release the changes/improvements you made. The closed source code you write is still yours to do what you want with (ie not release it to the public)

Someone who knows more on the topic can correct the inevitable mistakes I've made.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:04 PM
Many Java EE developers here btw?

Any interest in getting an Eclipse features/plugins/help thread going?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:05 PM
Quote:
Originally Posted by mindsplatter
Many Java EE developers here btw?

Any interest in getting an Eclipse features/plugins/help thread going?
I say start it up if you have an interesting question ready to ask.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:06 PM
Quote:
Originally Posted by gaming_mouse
so meteor is released under a GPL license... this means you cannot use it to create a commercial app, right?
Isn't that only when you use gpl code in your project? If I code an app in an IDE that is GPL, does that mean I can't distribute my app without the source code?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:09 PM
Quote:
Originally Posted by myNameIsInga
If I code an app in an IDE that is GPL, does that mean I can't distribute my app without the source code?
I'm 99.99999% sure this is incorrect.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:14 PM
Standard I am not a lawyer disclaimer.
Using a GPL IDE/compiler does not make your code GPL.
The general concensous is that making a webiste accessable does NOT count as distrubuting and it is ok. AGPL was created specifically to counter-act that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:18 PM
Quote:
Originally Posted by mindsplatter
This is all hazy and from memory. It depends which version of the GPL you use.
I *think* v2 is the most "commercially" friendly.

This is more concrete - you can of course use any GPL code in commercial software. If you modify the GPL code you have to release the changes/improvements you made. The closed source code you write is still yours to do what you want with (ie not release it to the public)

Someone who knows more on the topic can correct the inevitable mistakes I've made.
For v2, GPL restricts you from releasing derived works - that is any modification to the GPL'ed software or any other software that specifically depends on it. The restriction is that you must make your source code available under GPL. This generally doesn't affect SaaS, that isn't released to the end user, but affects any software where the object code needs to be shipped off to the user. So Google can internally use modified versions of Linux kernel to run their search engine without releasing those changes, but they can't put that in android without releasing the source code.

GPL v3 has stronger language regarding patents (the idea is that you can't use a GPL'ed work, release a derived work and the source code under GPL, but use a patent to stop anyone from using your code) a way to add optional clauses, most famously one designed to close what they saw as the SaaS loophole. Adding this particular optional clause results in Affero GPL, which considers making your software available via remote interaction as a release, legally binding anyone who uses a derivative work of AGPL'ed software to release the source code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:21 PM
@jjshabado,
I was just giving you options.

The truth of the matter is, writing an IE 6+/modern browser wrapper to handle events and XHRs is actually easy enough to do yourself.

Until the http protocol changes or something crazy happens with how browsers deal with the DOM then you will not have to touch that code base.

It's something you write once, test properly, and then use it indefinitely.

That takes care of #4/5, however if you're lazy or don't understand JS well enough to do that task then you can goto a site like microjs.com and find your own pre-made solution for the problem you're trying to solve. Chances are it will be slightly more bloated and have features you won't use but it's better than nothing and will certainly work.

I also cleared up the reason why #2/3 may or may not be needed in my previous post.

If you ignore #2/3 and do #4/5 yourself then you don't really need anything. You end up writing a super thin wrapper for #4/5 to normalize cross browser issues and expose easy to type methods and you're done.

If you decide you want #2/3 and do #4/5 yourself you end up with a really light weight solution that solves 95% of your problems. That is what I'm using atm.

I just linked to microjs.com because I don't feel like releasing the code I'm using yet. I'm actually in the middle of developing something on a much larger scale which I will open source eventually but it'll probably take another 3-4 months. It will utilize what I'm talking about today though, that is for certain.

I don't know why your BS meter is so high. Are you incapable of reading or clicking links? Go look at the sizes of a few microjs libs. A lot of them are in the 1-4k range. Slap together a few of them and you're sitting at about 9-10k.

I also explained exactly what components you need to have all the functionality you're used to using with jquery.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 01:25 PM
Quote:
Originally Posted by TheIrishThug
Standard I am not a lawyer disclaimer.
Using a GPL IDE/compiler does not make your code GPL.
The general concensous is that making a webiste accessable does NOT count as distrubuting and it is ok. AGPL was created specifically to counter-act that.
This is only true of server-side code. Client-side code has to be distributed by definition. But writing code that only has API-level dependency on some other code is not considered creating a derivative work by most lawyers. So unless you need to modify Meteor and need to somehow keep this modification to yourself, you'll be fine.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 02:38 PM
Quote:
Originally Posted by Shoe Lace
Troll much?

Anyways, I really enjoy using my 9.5k of Javascript which does the following:

1. Fully works in any major browser/mobile device, and goes as far back as supporting IE 6.
2. Selector engine that's faster than jquery's.
3. DOM manipulating that's on par with jquery's features but way less bloated.
4. Event manager that has enough functionality that I haven't needed more.
5. Fully featured XHRs (all http verbs, jsonp, etc.).

Oh the best part is I didn't write a single line of code
and the libs I use are all well maintained. I also can keep track and update them together or 1 at a time by typing 1 command and have the option to mix/match components whenever I want.
Quote:
Originally Posted by Shoe Lace
If you decide you want #2/3 and do #4/5 yourself you end up with a really light weight solution that solves 95% of your problems. That is what I'm using atm.
Quote:
Originally Posted by Shoe Lace
I don't know why your BS meter is so high.
Lol. Anyway, I've probably spent enough time with this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-11-2012 , 02:59 PM
Your quotes do nothing except prove how inexperienced you really are unless English isn't your first language, you seem to be failing to grasp very very very basic JS/DOM related functionality OR you don't understand what you're reading.

#4 is included in *my 9.5k library, and I made #4. It does nothing except allow me to listen to, fire, and remove events. I wrote some sugar to handle "once" too (events that fire once and get removed). Other than the once sugar it does literally nothing except what the DOM already provides with a method call, except it allows me to call my own wrapped method that detects if it needs to use the normal or IE version.

WOW that was tough to write. I mean, it took an entire 5 minutes.

#5 is me being nice and trying to assure anyone who's reading the list that it will support get, post, etc.. Most people don't really understand how the XHR object works and would probably assume getting support for the listed features is a big deal.

It's actually not a big deal.

* I referenced it as my library because I hand picked some of the components and wrote some of the components. In my mind, this is grounds for attaching "my" when referencing who made the lib but in the grand scheme of things it's 2 libs made by 2 people + extremely trivial "wrapper-style" libs that just make the DOM cross browser compatible (I wouldn't even call them a library).
** 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