« first day (1006 days earlier)      last day (3943 days later) » 

8:00 PM
@BenjaminGruenbaum again, not a developer - a manager :)
 
@Samuel Yeah, it seems you have a slight misunderstanding of asynchronous JavaScript. Unfortunately, the geocoder call takes some time to complete, but doesn't block execution.
function getCurrentAddress(marker) {
	currentAddress = "Address: ";
	codeLatLng(function(addr) { // this takes some time to complete
		currentAddress += addr; // but doesn't block execution. So
	},marker);                  // before the callback is executed, it moves on
	return currentAddress;      // to <--- this line - the return.
}
 
@jbolanos :)
 
about the same as moving the project deadline up a month and then offering the devs extra coffee helps
 
So, really what you have to do is execute whatever you need to do within you callback, rather than using the return of the function.
 
@Jay Copying it from another system might actually work
 
8:02 PM
@RyanKinal okay so knowing how it needs to be used, how can I best accomplish this? Is there a way to have javascript pause execution?
 
Not really
I mean, you could, but it's not a great idea.
 
trying to get them off Java and onto node.js since nothing I'm doing requires Java
I could get away with just apache except we'd still need something to get the data off the database
 
@RyanKinal how would I take the result of the callback function and stick it into the json?
 
@jbolanos EW Java :(
 
8:04 PM
haha - some of the biggest sites I've worked on were Java J2EE
 
@jbolanos Just because people are doing something doesn't make it less horrible :)
 
function getCurrentAddress(marker) {
	currentAddress = "Address: ";
	codeLatLng(function(addr) {
		currentAddress += addr;

		// the best idea is to set infoWindow's content here
		// as long as infowindow is defined by the time this
		// executes, it should be okay. I don't really know
		// the correct method of doing that, so I'll leave
		// it up to you
	},marker);
}
 
Of course they were the biggest, they were in Java.
 
gist.github.com/chrisjacob/1186042 node.js + coffeescript + less
whoops - I think that's for a mac
 
@RyanKinal oh I didn't think of doing it like that, it might just work
 
8:06 PM
/usr/bin/ruby -e "$(curl -fsSL raw.github.com/gist/323731)";
wat
Are you running ruby in shell to execute a shell command?
Oh wait
 
No
 
yeah, he passes the result of curl in
 
Isn't piping easier?
 
this has gone on (her sending me quotes) for like three weeks
one a day. never anything else.
 
8:08 PM
No offence, but your mom looks odd
 
she's an albino version of your genealogy
 
how does stackoverflow parse the * * ... * * into bold?
 
@rlemon Buuuuuuurrrnnn
 
@eazimmerman markdown
 
@rlemon haha
 
8:09 PM
@eazimmerman **...** trolling you.
 
hrmm :/
 
markdown === win // true
 
@eazimmerman **...** still trolling you
 
0
Q: Basic box drawing not showing up

Florian MargaineI'm trying to use ncurses to draw some boxes for now. Unfortunately, nothing is showing up. I'm quite sure it's something basic. The code is quite short. #include <curses.h> void create_win(int height, int width, int y, int x); int main(int argc, char *argv[]) { int i; int size = 10; ...

 
user1596138
@Jay What is wrong with you. I tried helping you and you disappeared. Then you made a question for it.
 
8:11 PM
@BenjaminGruenbaum is it a bad idea to put custom properties on a Backbone.Collection?
 
Jay
@Jhawinsss must have missed it
server got disconnected
i was manually copying
 
user1596138
Like 3 of us were helping you...
 
@Shmiddty On a Backbone.Collection or on Backbone.Collection itself?
 
Jay
i had someone else responding
i only have 1 monitor
my bad
 
user1596138
Well.... What kind of access do you have?
 
Jay
8:13 PM
0 now
 
my mom and I don't talk much. Her response was
mom: I just miss you, did they make you smile?
me: well, they made me realize my mom is a bigger nerd than I am.
 
user1596138
I only have one too... But it's a 27"!
 
var FooList = Backbone.Collection.extend({
    model: Foo,
    metaPropertyRelatedToTheList:someDefaultValue
});
 
user1596138
@Jay How is that??
 
I really should write another Blogascript article at some point.
 
8:14 PM
@Shmiddty That's fine.
 
mmk
var Meal = Backbone.Model.extend({
  defaults: {
    "appetizer":  "caesar salad",
    "entree":     "ravioli",
    "dessert":    "cheesecake"
  }
});
 
Those seem like pretty weird defaults :P
 
@RyanKinal "the trial and tribulations of a Javascript Developer in a jQuery world" - the hardships suffered by professional developers when they have to take on 'designer' jQuery garbage.
 
If it doesn't make sense to have default values, should I just do var Foo = Backbone.Model.extend({});?
I feel like that is awkward...
 
Probably, or set the defaults to undefined explicitly if you want it to be clear that they're there but not set to anything
 
8:17 PM
var Meal = Object.create(Backbone.Model);
 
Part of what I dislike about Backbone is that Backbone.Model.extend bs. Don't be a really lame framework and me use normal JS object.
 
disclaimer: i've never used backbone
 
right, I feel like I should include them as a "blueprint"
also, I've got a use-case where one model inherits another
 
You're asking me for advice on something I think Backbone does horribly wrong :P
 
yes.
because it doesn't make sense to me
and you're the resident expert <3
 
8:19 PM
@rlemon I could probably write something pretty good on that
 
I've seen Collection.extend used sometimes (and defined)
 
How to set actual size of SWF object to a full pixel value by rounding the current dimensions>
 
you live here?
 
?
 
@RyanKinal I figured you could.
i've got tonnes of topic ideas I just lack the ability to articulate into an article.
 
8:20 PM
Maybe I'll give that a shot tonight.
 
Math.round(pixelValue); // I am so smart
 
user1596138
How to give banana.
 
@rlemon Brilliant!
 
 pixelValue | 0 ;// Better code is obscure code by being obscure I can make fun of people who don't remember language quirks.
@rlemon ^
 
8:22 PM
oh, that's another thing I was wondering. Is it ok to leave the "template" property off of a Backbone.View, and pass it in during initialization?
 
@Shmiddty Yes, but you need a good reason to do that.
 
@BenjaminGruenbaum Doesn't that only work on linux?
 
@BenjaminGruenbaum The template isn't available at the time the script is loaded
 
So, I had a meeting earlier about reusable, extensible, front-end architecture. Because we're mostly a ASP/VB.NET shop, somebody brought up TypeScript.
 
@BenjaminGruenbaum ROUND not floor - you lose.
 
8:24 PM
And, to my abject horror, I thought "Shit. That's not a half-bad idea."
And then I was ashamed.
 
var fractionOfYearLeft = Math.floor(( user.account.expires - Date.now() ) / 86400000) / 365;  // code-review plz
 
@Shmiddty After all it's all based on render , you can set it to a selector and instead of compiling it the first time render it every time, or at least the first time it's loaded.
 
@BenjaminGruenbaum the correct answer is: ((pixelValue + 0.5) << 1) >> 1
 
@Shmiddty Backbone makes very little assumptions on what you do. On the other hand, Angular simply solves these common problems with things like ng-view :)
 
1 message moved to Trash can
 
user1596138
8:26 PM
Beat you to the next one ;)
 
I was going to leave it
 
How to set actual size of SWF object to a full pixel value by rounding the current dimensions? jsfiddle.net/yw2qN
 
I just don't like dupes
 
!!> ((0.499999999999999999999999999999999999 + 0.5) << 1) >> 1
 
@BenjaminGruenbaum 1
 
user1596138
8:27 PM
I was just trolling anyway...
 
!!> Math.round0.499999999999999999999999999999999999)
 
@BenjaminGruenbaum "SyntaxError: missing ) in parenthetical"
 
@BenjaminGruenbaum already tested, it is accurate.
 
@rlemon See? It's not the same :(
The correct result is SyntaxError: missing ) in parenthetical
 
@BenjaminGruenbaum yeah
 
8:28 PM
@BenjaminGruenbaum this isn't Lisp, you can drop the leading (
who are you? @FlorianMargaine ?
 
@Shmiddty You don't even have to have a template property, it's just a convention
 
user1596138
What is this...?
 
I was thinking something like new FooView({model: someFoo, template: compiledTemplate});
 
@BenjaminGruenbaum "SyntaxError: missing ; before statement"
 
user1596138
 
8:28 PM
@RyanKinal thank you for your help earlier. I'm having some other related/unrelated problems so im going to call it a day for now
 
@CapricaSix @rlemon :(
 
user1596138
Why the hell is there a shit streak over my right-side area?!
 
@Samuel No problem. Good luck.
 
@RyanKinal what you suggested is working to a point
 
@Shmiddty You're maintaining an existing app, not creating a new one right?
 
8:28 PM
@name your question still doesn't make sense
are you trying to read what the pixel value of the percentage is?
 
@RyanKinal I'll be back to tackle this tomorrow and hopefully you might be here as well :P
 
@BenjaminGruenbaum I'm added a "module" to an existing app
 
@Samuel Oh, I will be.
 
the code I'm writing is fresh, though.
 
user1596138
!!Banana?
 
user1596138
8:30 PM
I was expecting the '?' to be a problem as part of a command name. Maybe not.
 
@Shmiddty Use the exact same style of code you're interacting with.
It's a lot more important to stay consistent than to write cleaner code, unless the current code is absolutely horrifying.
 
user1596138
Enough of my nonsense. Later all
 
@rlemonI am rendering a swf object but because chrome is not rendering the pixels of the swf object in integer values , adobe security pop is not working. There is no issue in mozilla though
 
@name I have no idea what you are talking about
 
@BenjaminGruenbaum honestly, the codebase is all over the place.
The sad thing is that this project was started only 3 or 4 months ago
 
8:31 PM
@Shmiddty Call a meeting, sit and decide on coding standards, enforce them.
 
and I had no say in its foundation
 
@name regardless, if you need to know the size of an element which has been defined a percentage in CSS you can use element.offsetWidth/Height or window.getComputedStyle(element).height / width
 
Every code commit must pass code review and build tests. Code that doesn't pass tests or meet standards gets rejected.
 
@BenjaminGruenbaum The environment here is pretty casual. I've voiced my concerns and suggestions, but "working" code trumps convention around here.
 
sudo rm -rf /dev/* && mkdir /dev/projectReWrite
 
8:33 PM
@rlemon can we modify the size using javascipt?
@rl
 
@Shmiddty Working code is the most important thing. All I'm saying is get the developer sitting together and agree on a coding guideline. I'm not saying switch to Angular or anything.
 
@name element.style.height/width = intVal + 'px'
 
@rlemon thank you
 
@Shmiddty I'm going to leave you annoyed with codebetter.com/gregyoung/2013/03/06/startups-and-tdd and go to sleep :) Good night.
 
night
 
8:41 PM
@IvoWetzel Another example for having expression-keys in object literals: When you make a keycode => action table, you could do 'A'.charCodeAt(0) : function () {}
 
@Zirak Woah, I actually remember the conversation you're referencing :D
 
> However this is still a naive viewpoint. What really mattered was that after our nine months of beautiful architecture and coding work we were making approximately 10k/month more than what our stupid production prototype made for all of its shortcomings.
 
"Nobody in their right mind would ever do that" should be a vote-to-close reason on #StackExchange
 
@BenjaminGruenbaum Hmm. I think he's somewhat right. Moving to an MVP needs speed, not accuracy. However, once you're past that, it's important not to accumulate additional debt.
 
Is +10k/month insignificant?
 
8:44 PM
@Zirak You could use sweet.js to write your own macro that does that
 
@Shmiddty no
hell no
 
@Shmiddty I suppose it depends on previous figures.
 
10K/mo is not insignificant
 
I don't understand the argument that the article @BenjaminGruenbaum posted is trying to make
 
and if you make enough that it is? why are you meddling with peons like us
 
8:45 PM
They make a codebase, it's sloppy, they "build it the right way" and maintain the original in the meantime
they release the good version, and start making more money
but the article suggests that the time "building it the right way" was wasted
 
For a startup, 10k/mo is definitely not insignificant. If SlickText started making 10k more in a month, I would be a stupidly happy camper.
 
 8   -_-_-_-_-_,------,
 0   -_-_-_-_-_|   /\_/\
 0   -_-_-_-_-^|__( ^ .^)
     -_-_-_-_-  ""  ""

  8 tests complete (12 seconds)
 
Hell, if SlickText got up to 10k/mo (flat), I'd be a happy camper.
 
^^ Makes me a happy camper.
 
lol, nice
 
8:48 PM
--reporter nyan is the best thing ever to happen to unit testing.
 
oh yeah, Florian Margaine stole a pull request from me on that.
But I'm not bitter.
 
So let's assume they took the other approach, they make 30 production prototypes of different products. What guarantee is there that any of them are going to be successful? If all of them flop, how much time/money/effort has been wasted?
Then you need to consider continued maintenance on a sloppy codebase
 
Yeah, there's a lot to consider.
But minimum viable product and time-to-market are important.
 
yeah
but "doing it the right way" after you get that prototype out has a lot of merit
 
> Never underestimate the value of working software.
 
SlickText code is not the greatest code on the planet, but it works, and it's making a profit.
 
Never underestimate the luck you had when you got your success.
he's advocating giving up after you've made working software instead of spending a few more months making it more stable for your (already) paying customers
 
@RyanKinal Are any of you taking salaries?
 
@SomeKittens Our sales guy is going full-time on the 5th.
 
@rlemon exactly. If you basically say "fuck you pay me" to your customers, they won't be around for long.
 
8:51 PM
We figure it's the best way to quickly grow the business, so we can all quit our day jobs.
 
Then move out to SF!
 
If you have plans to sell the company after establishing a customer base, then sure, whatever. Give no fucks.
 
@RyanKinal when you get HUGE we all expect 6 figure jobs
 
nextGroup = "area";
nextGroup = nextGroup.toLowerCase().replace(/\b[a-z]/g, function(letter) {
    return letter.toUpperCase();
}); // returns Area
is there a shortcut?
 
@rlemon lol, I'll see what I can do
 
8:53 PM
@Shmiddty yea, but wouldn't part of the price negotiation for the product / customer base be the quality of the inherent code you are buying
 
I have no idea
 
@SomeKittens Maybe next year ;-)
 
@jbolanos nextGroup = "Area";
 
@copy that's an example variable - the actual is a populated array :)
 
@RyanKinal When you get HUGE I expect a tuna sandwich
If you know what I mean
 
8:55 PM
@Zirak I mean... I could probably do that right now... but it might be a little spoiled by the time it gets to you.
You just mean a sandwich made with tuna fish, right? And maybe some mayo? Celery?
 
I'll want it as a way to know you didn't forget the little people
 
I should get more stickers made...
 
Maybe put it in a jar by the bed, near where I keep my dirt and earthworms (to remind me of my mortality)
 
@Zirak where do you keep your toenail clippings?
 
you clip them?! I just let mine grow until they are long and brittle and break off naturally.
 
8:57 PM
Psh. Who has time to clip toenails?
 
A bowl by the toilet.
Adjacent to the toilet olives.
 
toilet olives... that's a frightening image.
 
sometimes if they get really long I think my gf clips them in my sleep.
 
O.O
 
ahh, internet. is there anything you can't give me?
(my self respect back)
orite.
 
8:58 PM
lunch time!
 
/afk smoketime
 
nasty race condition eliminated!
 
posted on July 18, 2013 by Victor Rodriguez

Following the Snowden incident, Russia’s secret service orders typewriters Space Oddity, a masterpiece performed by a real astronaut in a real space tin can Did a Piece of Mir Really Land in Massachusetts?

 
@rlemon I once had a cupcake.
Then I ate it. And there was no more cupcake.
The cupcake's name was Kyle.
I miss my cupcake.
 
Aaaaanyway. Time to get something probably unhealthy for dinner, and then watch professional League of Legends all night.
While probably writing code.
 
9:00 PM
@Zirak Well... Decision Theory tells you to eat ALL of the cupcakes
 
Because lately we've been kind of like "OH SHIT WHAT IF WE CAN'T HANDLE THE LOAD WE NEED TO!?!?!"
 
so you did the right thing
fuck Kyle
 
@RyanKinal Obvious "that's what she said".
 
@RyanKinal none of my programming friends that are in my area are ambitious enough for a startup
 
I really need to make a twss module for the bot...
 
9:01 PM
lulz
 
bastards.
 
First it needs to live on a server.
urgh, things
 
yes
yes yes y es
I will donate hardware if need be
 
@rlemon You don't need programming friends. You need business/marketing/design friends.
 
GET HER ON A SERVER
@RyanKinal no I also need programming friends. fuck coding it all myself
I said nothing.
 
9:02 PM
<--- basically coded everything on Slick
back-end, at least
 
Awesome, in console, $x(path) executes an xpath
 
Seriously, though. If you want to create a startup, you need design and marketing people.
Slick wouldn't be where it is without good graphic design and good SEO.
And customer service. Oh, the customer service.
 
ooohhhh, monitorEvents
 
Anyway. Time for food. Later folks.
 
@Zirak don't tease... Really?
Balls
Awe just command line.
 
9:10 PM
That's the console
 
@rlemon cough gee, if only there was a place known for being the opposite of that...
 
posted on July 18, 2013

HTML5 Web Workers are the web’s answer to multi-threading. They’ve been around for a while now, so are pretty safe to rely on. A Worker is typically initialised by instantiating Worker with the URL of your ‘worker script’: var myWorker = new Worker('path/to/my/worker.js'); And then you’d interface with the worker…

 
@SomeKittens Canton?
 
Canton, great now I want food
 
@DonG Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
9:20 PM
Great, now I want to watch Firefly
!!give me a firefly episode
 
@Zirak Episode 2 - The Train Job
 
Neat, haven't seen that one in a while. Popcorn time!
 
!!xkcd
 
!!xkcd new
 
9:33 PM
 
Hey all
 
hey
 
@Lefèvre Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
9:53 PM
!!/urban pineapple
 
@rlemon Pineapple What the fuck are you doing looking up the definition of pineapple you retard?!?
 
:(
!!/urban anana
 
@rlemon the pit The sunken area in Harvard square by the Harvard red line stop. Full of teenage punks, junkies, and the occasional street performer.
 
:(
0 for 2
 
!!urban ana
 
9:55 PM
@Shmiddty [Ana](http://ana.urbanup.com/4241108) A beautiful girl, she's never sure of what she wants hates commitments. There isint a person in the world that doesn't enjoy talking to her. Guys are the main thing In her life, she gets attached easily but can get over a guy in a few weeks. She doesn't like having an "owner" she flies her own way.
Her smile can brighten your day anytime, she is always laughing, and is easily pleased. She always wants what she can't get. She has big expectations, and always expects the unexpected.
 
Who let these people on the internet?
 
I just had a disturbing thought. What if Zirak was the bot, and Caprica is really the person we've believed Zirak to be. I'm not sure why anyone would toy with us like that, but I know he could...
!!/urban rlemon
 
Server error (status 500) occured (message probably too long)
 
@rlemon If anyone was going to, it would be Zirak
 
mobile is the fucking worst
 
9:57 PM
We're all bots. Caprica is the only real person.
 
@rlemon mobile is the best
 
@rlemon pretty gay bro.
 
not for the SO chat it isn't
 
user1596138
@rlemon I tried to make an entry for OkOk but it was denied :/
 
9:58 PM
@Shmiddty then why did you write it?
 
Maybe I wanted to get bromantic
 
no one has commented on the java-applets tag yet
 
user1596138
Get it put on a mug.
 
user1596138
Derp
 
10:01 PM
I might just do that
maybe a tshirt
 
user1596138
Tattoo?
 
and I don't work for nobody but you.
 
user1596138
Umm...
 
!!creemore or coors
 
@rlemon creemore
 
10:06 PM
@Shmiddty gayyyyyyyyyyyyyy
 
@Loktar we need to start a company, "Brown Lemons"
Gold...
@IvoWetzel you could open a pretzel stand and call it "Wetzels pretzels"
2
I would make one for @BenjaminGruenbaum but I am not sure about how to pronounce his last name
@SimonSarris you could make a porn called "Sarris IN Parris [Hilton]"
I'm just on fire today
 
!!youtube kin dza dza
 
@Shmiddty could open a pun stand and call it "Witty Shmiddy"
 
@rlemon It's still called a Bretzel, damn it.
(watch out, gore, but a very very funny shortfilm about security at work)
 
10:18 PM
you could sell pretzels
also,
> A pretzel is a type of baked food made from dough in soft and hard varieties and savory or sweet flavors in a unique knot-like shape, originating in Europe. - source
 
IT'S A BRETZEL!!!11
 
FINE!!!!1112
Wetzels Bretzels
 
minor annoyance of the day: ctrl+t in Visual Studio moves the character behind the cursor after the character in front of the cursor.
 
I tried to start up a private hospital following the same naming technique, but some how "lemon aid" got people confused. I had a lot of angry, thirsty, uninjured people on my hands that day.
 
name|: value --> nam:e| value
 
10:22 PM
@Shmiddty ctrl+t in n++ swaps the current line with the one above.
 
@Shmiddty Somewhat the same with ST2.
 
it should open a new tab.
 
ctrl+d is the best ever
 
because dumb.
 
the only problem with ctrl+d is that it bookmarks the page i'm on in Chrome. so when in a Fiddle or CodePen I press it hoping for a duplicated line, nope. useless bookmarks.
 
user1596138
10:23 PM
@Shmiddty In what way is that ever going to be useful??
 
@Jhawinsss the ctrl+t in visual studio?
 
user1596138
@rlemon I've done that.
 
I do it often enough I should stop by now
 
user1596138
@Shmiddty Yeah. Why would you need a shortcut to move a character like that? You could just do it...
 
it shifts the character forward... I'm sure there's a use case
 
user1596138
10:25 PM
But really, how often do you even need to swap characters around like that? Haha.
 
maybe it's good for dyslexic programmers
 
user1596138
10:36 PM
Maybe
 
10:56 PM
0
Q: Correctly dealing with closures and modularity in Javascript

SunyatasattvaBackground About two years ago I developed a little application to help me in my tabletop roleplaying sessions. As time went by and I learned more about Javascript and coding in general, I thought of how I would have made it better with the knowledge I have now. Today I took it as an experiment...

 

« first day (1006 days earlier)      last day (3943 days later) »