« first day (1614 days earlier)      last day (3333 days later) » 

3:00 PM
@RoelvanUden - Perhaps innodb does.
MyISAM should have never been implemented imo
 
Morning!
 
mysql was the worst dev experience I have had so far
@SpencerRuport o/
@SpencerRuport - exoticsracing.com/Lamborghini/… :D And we booked Tiesto on Apr 1
 
@TravisJ Really? Mine was C :-D
 
@RoelvanUden - I dev'd a few homebrew games in C and really liked it.
I have always liked the entire C family really.
I was way into Java until we used it at a Programming competition.
 
I programmed C for the first two years of my devving experience
 
3:03 PM
C is a really good language
 
After going forward to new languages, C sucked. HARD.
 
@TravisJ - Woohoo!
 
C is simple
simple is good
 
Where's Tiesto playing?
 
Simple is good. C is not simple. Too many edge cases, deprecated libs and funky shit
 
3:04 PM
Hakkasan, he and Calvin Harris are the house DJ's there
 
vacation tomorrow, cant wait for this day to end
 
Coldfusion was my worst programming experience.
 
I think C is pretty awesome, but I wouldn't want to use it server side instead of C#
@CharlieBrown - Nice!
 
@TravisJ - That's gonna be siiiiick.
 
@SpencerRuport - Server side php?
@SpencerRuport - Yeah, apparently it's the largest club in the world, holds 3500 people
 
3:05 PM
@TravisJ - Cold Fusion is worse.
 
I thought Cold Fusion was server side php, is what I meant
Never used it
 
I want to create a Factory (that manages all my customers). I need a reference of my database connection in there. What is the best way to couple those? Constructor, singleton (they told me yesterday that you never want to use singleton), or do I keep my factories in a class, together with my factories?
 
why never use a singleton?
 
They told me yesterday :P
 
@KalaJ - Cross cutting concerns. But really, singletons are everywhere. Just do it as a super ultra wtf last resort.
 
3:07 PM
And there should be an opportunity to use a second database connection, so Singleton is wrong I guess :P
 
What do you mean by cross cutting concerns?
 
@ErwinOkken establish db connection in singleton is tricky, you have to make sure the exact connections themselves are segregated
 
I've used singletons :S
 
@ErwinOkken - Inject the db connection into the ctor of your customerfactory (btw, that name raises alarms)
@KalaJ - Wait, whaaat?
@SpencerRuport - eww
 
3:08 PM
Factories. Ewwww.
 
@ErwinOkken - I suggest you read up on design patterns
 
@TravisJ - Yeah it's fuckin' ugly.
 
I don't have experience with patterns, so services, factories, etc, are all new to me :P
 
Skim those
 
k cool
 
3:10 PM
Some you wont need, some should be perfect
 
@TravisJ, ahh ok
cool, do factory seems interesting
 
imho, you should wait to learn patterns until you have about 5 years under your belt
 
Really?! I think it should be the first thing people learn.
 
It should be the first thing
 
It should be taught from the get go imo
 
3:12 PM
I'm still a jr dev and my PM asked me to write a license manager as a singleton
 
Right when you learn about objects
 
@TravisJ it doesn't work that way... i tried to explain our new guys why we should use this and that pattern, and after all he just make everything public static
 
@tweray - pain :(
 
@KalaJ - Give it a try. When you're done, try to find another job. :P
 
lol why?
I've done it already for my last project
 
3:14 PM
Singletons never go aways. They are the god codes, eternal and immune to GC
 
the fact is if you never experience the pain while fixing those public static shit, you just feel you can do anything with it
 
@KalaJ - I just mean it sounds like pretty heavy stuff for a junior dev. You probably aren't getting paid enough.
 
And that's why we have code architects; to prevent idiots from screwing the general structure.
 
I'm not getting paid enough for where I live but I like learning new things LOL
 
protected void Application_Start()
{
    this.Factory = new SingletonFactory();
    foreach(var instanceCtor in this.Factory)
    {
        instanceCtor.Create();
    }
}
winning :D
 
3:16 PM
I disagree, respectfully. You should be writing code and refactoring to a pattern as needed. Let junior devs concentrate on learning how to write good clean code first. No junior dev should be implementing patterns in any non-trivial production application
 
@KalaJ - As long as you stick with smaller companies there will always be opportunities to learn new things.
 
@SpencerRuport, yeah I'm at a small company. We're like 50 ppl
 
@CharlieBrown - But being aware of the pattern being used makes them also more cognizant of what the purpose of the code they are writing is.
 
@KalaJ That's huge!
 
Is it? I thought a company like Google is huge
 
3:18 PM
It's at least twice as big as the company where I work :P
 
@KalaJ if you mean 50 devs, that's already fairly big imo
 
no, I mean ~50 people in the entire company. Devs are maybe 30? not sure
 
@TravisJ I agree with the idea, but in practice I don't think it will make a difference. Most devs have a hard enough time learning how to use the syntax of c# correctly. The pattern adds more noise to the signal. I want them learning how to write good code.
 
@RoelvanUden, how many people are at your company?
 
@KalaJ 20 :P
 
3:19 PM
wow that is small. How big is your team???
 
I dont care if you know how to implement a composite tree, if you dont know the difference between references and values.
 
ish.
@KalaJ 4 :-P
 
hmm I see. My current team just got bumped up to 10 people because of the need to finish this project on time
My last team on android was just the two of us and PM
 
@CharlieBrown - If you work with people who don't know the difference between reference and values there are probably more problems than understanding design patterns :P
 
Most developers out of college dont understand that well enough
 
3:22 PM
@KalaJ We generally work a product with 2~3 variating between different combinations of the people. More people does not always equal getting a product done sooner.
 
10 ppl a team is not a great idea, ask your boss read this:
http://blog.idonethis.com/two-pizza-team/
 
You can't base it on your own skills, the vast majority of kids coming out of college lack fundamentals
 
Or.. more correct. We value correctness. A lot. It HAS to be correct.
 
i thought 2 pizza team is already a industrial standard :)
 
hmm maybe you're right but when my team was just the four of us, it was pretty good
*four devs *now it's like 8 devs?
 
3:24 PM
@CharlieBrown - Need more ivy ;)
 
no doubt
for every ivy league developer, there are 5,000 developers from a small local college in their hometown.
 
@KendallFrey @RoelvanUden how do I open to git from the command prompt. When I installed git I have an option to right click on any folder and click get bash which would open the git terminal but how would I go about accessing it from the command prompt?
 
@CharlieBrown but you have to think about how long will be their learning curve, we have to punch all those things into their brain in a very short time and make them productive, you don't want to keep educating some kid for 4-6 months and then he/she start to really create some value for another 4-6 months, and then they just change a job
 
2
Q: How to prevent StackOverflowException when reusing a callback in a callback?

jishiI have some code that relies on the HttpContext.Cache, where I want it to re-cache something if a certain criteria is met. However, this introduces a potential stack overflow, and I'm not sure what would be the appropriate approach here. Look at this code snippet: void OnCacheItemRemoved( strin...

 
i think I found it here
17
Q: Command-line Git on Windows

AyusmanI have installed msysGit 1.7.10 on my Windows 7 machine. What I need to know is if I can still use Git from command line? When I try the git command in the command line right now I see: 'git' is not recognized as an internal or external command, operable program or batch file. Is there any...

 
3:29 PM
Thats business. Any business that takes on college grads should understand that training is required. Hiring college grads and not training them is irresponsible, and imho bad business
 
I agree, that
*That's what happened to me. I had to learn a lot on the job ><;
 
Every company I've ever worked for has had a sink or swim attitude about their devs.
 
Training for more experienced devs, is a combination of personal time and company provided time. The more experienced you are, the more you are expected to do your own training
 
@Skullomania just type git <command>
for example, git init to create a new repo
 
@SpencerRuport And when your the senior developer or decision maker, remember that. And treat your ~~subjects~~ developers wisely
 
3:33 PM
@CharlieBrown it's 100% correct, but doesn't apply properly to the current job market. if i can guarantee a college graduate can really stay in the company and being productive for over 2 years, i don't mind to spend 4-6 months for them to learn. but kids nowadays changing job as frequent as changing girl/boyfriends
 
well it has to be installed in your PATH obviously
 
@Skullomania you have to run the git sh.exe
 
@tweray thats the market. the problem may lie in the companies they work at (hint, hint)
 
3:34 PM
@Skullomania, set your path variable
 
try yourgitinstallationpath/sh.exe --login
 
Control Panel > System > System Protection > Advanced > Environment Variables
 
Or just use an installer that does it for you
 
@KalaJ i thought I needed to do that...@KendallFrey someone said I didnt need to...
 
Not if you installed it properly
 
3:38 PM
@CharlieBrown the fact is in west coast a lot company encourages low dev to transfer job if they don't get any promotion in their company, and it is also a fact that the best way to get a raise is to change a job for mid-low level devs. under this atmosphere, you cannot expect kids to be "loyal" if that's a good word to describe
 
@tweray - As soon as I hear someone complaining about employee disloyalty I wonder what the company is doing to try to inspire loyalty. Companies that offer two weeks vacation, bare bones health insurance, open office designs, aging equipment and no mentoring education programs are a dime a dozen.
 
@Skullomania, that in theory should solve your issue though. That's what the error message meanas
 
@SpencerRuport well, i am not asking ppl to be loyal, my point is "hey kid, you are not going to stay in this company for longer than 12 months, then how the hell can i offer you 6 months to get used to the job"
 
@tweray A good company will give you the raise you deserve.
 
"Because you have nobody else."
 
3:40 PM
@SpencerRuport that's sad but true :(
 
Employee leverage is sad?
@tweray - If your company doesn't foster the growth of it's employees it would be silly for them to stick around. This industry moves fast and being loyal to a company where their skills are stagnating is going to have a huge negative impact on their career.
 
@SpencerRuport well, the fact is we are fostering, but it is not resulting good
 
tada
 
today you are still mentoring someone, tomorrow that guy send the boss a 2week letter. i mean, have you even ever asked for a raise? or you just know you don't deserve it?
 
@tweray thats maybe my point, loyalty is so 1945. You give time to your company and your company pays you. No owes anyone anything after that.
 
3:45 PM
@tweray - If they deserve a raise then don't make them ask.
 
^ I believe thats in the Joel book somewhere
 
@SpencerRuport maybe that's where i'm being too 1945... is someone deserve a raise when he finally can do something by himself?
 
@tweray - All the things you're saying are the direct result of an industry where the employees have the upper hand. Most management handbooks were written by people working in industries where employees were easy to come by. You have to change up your strategy.
 
Hi, I am all set to create my first web service in C# that people can consume. The design etc is in place but I am lost wrt technology to invest time and effort in. ASP or WCF or xyz...could someone guide be a bit here please?
 
@thePetProjectProgrammer who is using it?
 
3:47 PM
Web Api
 
and yes, probably WebAPI :)
 
@Squiggle although, yours was the more pragmatic answer
 
@tweray - Maybe? Scope it out. Assess your employees individually, try to find jobs they would apply for and try to figure out what those companies are willing to pay. Are you paying less? Then give them a raise or risk losing them.
 
@Squiggle I hope anyone interested in consuming it..does it make a difference? how?
 
@TravisJ sorry, got stuck with something here
 
3:49 PM
@thePetProjectProgrammer - Avoid WCF whenever possible. It has it's uses but they are few and far between.
 
@thePetProjectProgrammer more precisely, will it be exposed to the public, or internal B2B?
 
@thePetProjectProgrammer For internal operations SOAP is nice. It comes with WCF. WCF has a ton of different options and mechanisms, and is pretty steap to learn and hard to master/debug. ASP.NET MVC Web API is easy, straightforward, and offers XML/JSON over HTTP. Easy.
 
anyway screw it, it just hurt my heart when i tried to mentor a guy can really do some help and they turn to help someone else. it's my boss's job to keep them here. i'm too oldschool i know and i guess i am not very capable to change how it works, at least in short-term
 
Pick what is appropriate.
 
l@charlie I can't foresee a b2b, at most other programmers may consume it to build what may be commercial apps
 
3:50 PM
@tweray I look at that as, you should be happy to help people, no matter where there career takes them. Your not mentoring a worker bee, your mentoring a fellow developer in your industry
 
@tweray - It's not personal. They're making the best decision for them. It's your company's job to try to make sure staying with the company is the best decision.
 
Agreed, CB :)
 
@thePetProjectProgrammer then web api
 
but anyway @CharlieBrown @SpencerRuport, i do learn something pretty useful, thx
 
i know this is going back a bit...but the way I asked for a raise was to look at what others in my position was getting and walked in and asked. When he said no, I applied to another company and showed them what they were willing to pay me and then he said yes
 
3:51 PM
I've had good working relations with people in previous companies who have left, then years later been the source of a good job offer of my own :)
 
@tweray - And yeah what @CharlieBrown said, I bet they are grateful to you as a person. Don't confuse your company with you. If you take the time to teach someone a new skill they'll remember you.
 
@Skullomania doin' it like a pro
 
@Skullomania definitely, its good to keep an open dialog
 
yeah that's a good viewpoint. i should learn it, i mean life is learning
 
@jishi - That's fine
 
3:52 PM
@RoelvanUden learning curve aside, what are the prospects of investing in wcf...I see all kins of conflicting opinion on the interwebs? utterly lost.
 
@jishi - Are you taking steps to ensure that the timeWindow you use is significant? Because no amount of work would save you from infinite recursion in the case of a very small timeWindow
 
that's all they understand! They will say they can't because its their hope that you are "stuck" or that you will not go look somewhere else. The truth of the matter is that they need you or they would have fired you. They are just not going to opt to pay you more unless they feel they need to
 
@TravisJ So what did you mean by caching the recursive call? I'm thinking that maybe it is removed directly with reason "Removed" or "Underused", and in that scenario, the stack will build up
 
@thePetProjectProgrammer It's the leading communication platform for Windows .NET applications. It won't run at all on other platforms, e.g. Linux or Mac. Consuming a service from those platforms is no big deal. WCF will have a future, for sure, but almost all development is shifting quickly to open and simple systems. For .NET, that is Web API. The future is the web; not whatever-other-transfer-system. Web API is IMHO the best bet for new applications (certain circumstances/requirements not mentioned)
Also, Web API will merge into MVC6 and will run on Linux/Mac. Cost effective.
 
3:55 PM
@RoelvanUden damn thats a good answer
 
@CharlieBrown Thank you :-3
 
@TravisJ The timeframe is relevant, it is always 30. And I was under the impression that a regular invokation of the callback, would not have the initial stack (according to my debugging test)
 
@jishi - I was thinking that there was a large call stack which was unwinding and causing issues, but your problem seems to be from an infinite "drill" if you will where the calls never stop and cannot stop. I think you are probably accurate in that the remove reason can be looked at. Are all scenarios correct in needing insert?
 
My question is though, when to ask for a raise. We were supposed to have a performance review soon but it never happened?
 
@thePetProjectProgrammer - WCF was originally proposed as a one-size-fits-all web service framework. It works but WebAPI works just as well for most web applications and is a lot easier to work with.
 
3:58 PM
@jishi - The two scenarios you would need to worry about with freeing memory is when the system needs memory but is constantly adding and removing the item, which would cause thrashing.
 
and honestly, I was a tester before a dev in this company, they initially gave me a 1k raise for the new title and they promised more when I was with the company longer, never happened
 
And also the scenario where the key existed, but the item was attempted to be inserted again, which would cause the infinite recursion
 
@TravisJ Yes, it should be fine, however, I'm concerned about if there could occur a race-condition, where the insert would call a OnCacheItemRemoved on itself somehow, with "Removed" reason
 
@KalaJ I usually send a nice reminder email about the review. Then, do an honest assesment of your abilities VS your internal peers and your external peers for pay scaling
 
@KalaJ - Go to some interviews and get some offers. Best case they'll match the offers, worst case you'll find a better position.
 
3:59 PM
@jishi - Perhaps if the key exists you should not insert.
 
@TravisJ I never remove anything programatically, I just try and re-add it on expiry
@TravisJ The point is to extend the cache period, but I haven't seen another way of doing that?
 
@jishi - Even with an extended cache window, you could have the same issue with the keys.
 
Hmm I see. I'm hoping the review date is soon. I am thinking after my team finishes development on this project, I can definitely ask
 
@jishi - Do you have unmanaged resources which require disposal in the cache?
 
@TravisJ No, no unmanaged resources. Well, I was under the impression, that if an item, with a certain key, was invoking the CacheItemRemoved callback, an insert for that key couldn't trigger another CacheItemRemoved callback on the same item?
 
4:04 PM
@jishi - If you call with a duplicate key it triggers the ItemRemoved callback. https://msdn.microsoft.com/en-us/library/system.web.caching.cacheitemremovedreason(v=vs.110).aspx
Removed: The item is removed from the cache by a Remove method call or by an Insert method call that specified the same key.
 
@TravisJ I'm running it now and logging the RemovedReason, to try and get any pointers.
 
k
 
@TravisJ Yeah, but this is called in the callback, and by that time, I would assume that it is already removed. This only happens occasionally as well, not for every callback.
@TravisJ But the main point, is it usually safe, to reuse a callback within a callback the way I did? Call stack wise?
 
@jishi - Right, if it happened every time it would be more obvious :) Which makes me wonder about the remove key. If it is thrashing from the unused, it should show up in your system resource monitor.
As defined, you should not have issues with re-insertion on removal as that shouldn't happen very often.
The callstack should be rather small
@jishi - Earlier, did you say the timeWindow was 30? As in seconds? That seems rather quick.
@jishi - How many items are going to be in the cache? How many unique keys basically, and how are you generating the keys?
 
@TravisJ Yeah, sorry, it is actually 60. But it's small by default, it's for identifying spams to certain URLs, and blocking them. During busy traffic, I expect it to be around 2-3000 items for this
@TravisJ The keys are basically [IP]/path/from/url
 
4:12 PM
Are the keys added from different threads?
 
@TravisJ Hm, I realize that it might occur a race condition if the same IP hits the same url, between my cache check and the insert.
yeah, this is in ASP.NET so it's multithreaded. hm, I need to think about what would happen in that case
 
That might cause the existing key issue.
Your case of 3000 doesn't seem to be too harsh. It is basically one call every 20 milliseconds which is a little rough but probably not enough to cause an overflow.
 
yeah, I guess then two CacheItemRemoved callsbacks would race against each other. But I'm not sure why that would result in a stackoverflow though
 
wouldnt sliding expiration work?
 
I am not sure they would race. I think the first would enter just fine. The second would hit the OnCacheItemRemoved on insert, and then attempt to insert itself in that callback; and then hit the OnCacheItemRemoved on insert, and then attempt to insert itself in that callback... etc.
@jishi - Perhaps if you added their session guid to the key
Although even then you may still get the existing key scenario
 
4:16 PM
@CharlieBrown well, sliding expiration will be extended for every access to the cache. I experienced that it never really released itself, but I have done some changes since then and maybe it was an oversight on my part. Thinking about it now, makes sense.
 
Just check for existence and if present, do not insert :)
 
@TravisJ right now I'm trying with only reinserting if it's an Expired reason, let's see how that pans out
 
if ( c == null || Cache[key] != null)
  return
 
4:48 PM
morning kids
 
good afternoon
 
Am I misreasing this post from Stephen Cleary? stackoverflow.com/a/23549221/1026459 He says "I don't think that the "build a list of tasks", "await Task.WhenAny", "remove completed task from list" approach is very clean." And then seemingly goes and implements that exact pattern.
 
slightly diff
 
@TravisJ what he's saying is bundle the steps to download one file into a method, then call that method multiple times
 
plus WhenAll()
 
4:57 PM
rather than collecting a set of urls, downloading from each url, etc
 
WhenAll is very similar to WhenAny
 
but also, you know, different
 
Still swallows exceptions for example
Unmanaged resources can leak memory like that
 
I read about "covariance" once, now I can use it. I'm amazed :D
 
Covariance to me just means limit the set of behavior.
 
5:02 PM
@ErwinOkken it is indeed amazing
@TravisJ I'm not sure what a "set of behaviour" is, but doesn't covariance make things more generic, not less?
 
^ That is what I was thinking :p
 
@KendallFrey - If you use object, you have to cast to get specific behavior, otherwise it just has the small default set.
 
I have no idea how that is related to variance
 
@KendallFrey - You meant more generic, I thought you meant using the type as object. Even if you use a more generic interface it can still have less access. For example using IEnumerable on an IQueryable
 
I have no idea what you're even saying anymore.
 
5:09 PM
Lamp.
 
I know that word!
 
Haha
 
I know most of those words in fact, but the order in which they are presented does not trigger any recollections in my neurons.
 
"Context" :D
But your description fit best :D
 
Thanks for the tips @CharlieBrown and @RoelvanUden I'll check out web api.
 
5:14 PM
@KendallFrey - as use generic IEnumerable Even the an You interface thought object. you For meant using generic, example type still if a have less it more access. using can I meant you on more
Or perhaps, Even meant on more you using using have generic, For less access. thought more it you a as use generic still I meant type the if IEnumerable interface an example You object. can
 
object. generic, IEnumerable the less more still more thought meant interface You access. an Even meant have you can I as if type For it using generic use on you a example using?
Any of those orders helping?
 
would you like fries with your order?
 
Double cheese please.
 
for(var i = s.length-1; i > 0; i--){
 t += s.splice(Math.random()*i|0,1) + " ";
}
:D
 
5:16 PM
forreal
What does that pipe do? :P
 
(int)
 
OR right? :p
oh
 
bitwise or
 
ye ok
 
gets rid of the random cruft
 
5:17 PM
Was the >0 intentional, or a bug?
 
correct
It misses a word
 
word?
oh, is s an array?
 
yeah
But it does actually miss the last word in the array
 
document your code
 
lol I figured you would have no problem with it
I only wrote it in the url, didn't feel like making it verbose
 
5:19 PM
What am I supposed to think when I see s?
 
string array :P
 
:D
 
;)
 
!!
 
5:20 PM
@TravisJ That didn't make much sense. Maybe you meant: d, π, !
 
!!d
 
!!n
 
@SteveG That didn't make much sense. Maybe you meant: d, no, π, !
 
it's π
 
5:21 PM
I had a good time deobfuscating some rlemon code last night
 
good :)
 
@KendallFrey - Heh, rlemon obfuscates based on beers consumed.
 
it took me too long though
so many f-ing -- and ++
 
Did it use ascii character codes?
 
actually no
 
5:22 PM
Well at least it wasn't full crazy then
Nothing like building your instructions in ascii and then sending them to eval in order to execute :)
 
it may as well have been, it was effectively a custom encoding
oh, and no eval required
I wish I had more opportunities to deobfuscate JS
 
Hug.
 
I really wish linux developers would get together and agree on at least one common way to exit a program.
 
exit(0)
don't see the issue
 
5:25 PM
esc:q, ctrlx, ctrlc, ctrlbreak, q
 
those terrorists got some more people
 
@KendallFrey - 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; return v.toString(16); });
 
what ones
 
tunisia
 
@TravisJ blindingly obvious, you can do better
 
5:26 PM
tunisia has terrorists now?
 
yeah, it's all over the news
they ghosted like 17 tourists
terrorists killed tourists
 
tourorism
 
lol
 
@ton.yeung - yes, not mine though it comes from this answer stackoverflow.com/a/2117523/1026459
it is the only copy pasted SO code I have in my codebase, and I documented it in a comment actually
ironically that is the most obfuscated piece of code I can find as well
"On your right, there is the massive span of the Sahara Desert, and on your left, there is a dictator being overthrown."
 
can't we all just get along
 
5:28 PM
@TravisJ I was thinking more about this level: gist.github.com/kendfrey/5461964
 
@SteveG - Yeah, lets all go and take out Along!
@KendallFrey - No ascii there either :)
 
what do you mean?
it uses ascii codes
 
@KendallFrey - Ah, you are correct. I see charCodeAt now
Only glanced, didn't pay much attention to the string concat, thought it was probably a simple message.
 
@TravisJ - Did you ask the author if you could copy that code?
 
@SpencerRuport - Don't have to, it is fully documented.
Their name is included
 
5:34 PM
@TravisJ - But it's a share alike license.
You technically have to share the rest of your code.
 
That is a misconception.
I am not releasing the code into public domain.
 
is there a way to make properties/fields show up in the watch window as hexadecimal without making every value show as hex?
 
I mean, really, I could obfuscate the code from its original version if I felt like being an ass about it.
 
5:43 PM
damn
i'm bored, but don't want to pick up more work because i have like 10 things in progress that are all blocked
 
write a sonnet
 
want to do it together? it'll be like a bromance moment
 
how about some js code golf?
 
hell yeah
 
reduce or improve:
function generateHeightList() {
    var list = [];
    _.forEach(_.range(4, 8), function (f) {
        _.forEach(_.range(0, 12), function (i) {
            list.push({
                Name: f + '\' ' + i + '"',
                Value: f*12 + i
            });
        });
    });
    return list;
}
 
5:47 PM
@CharlieBrown - Reading the comments is pretty entertaining.
 
I don't know _
 
@SpencerRuport yeah, lots of seething hate going on
@KendallFrey lodash/underscore
 
I know that
telling me the name of a library doesn't make me learn it instantly
 
@CharlieBrown - Why foreach/range? Is that really more readable than for(var f = 4, f < 8; f++)
 
@SpencerRuport - jsfiddle.net/Luavzy7p
 
5:48 PM
just less nesting
 
@CharlieBrown - It's still nesting a function.
 
@SpencerRuport actually, i think i had refactored to that, and just never removed it
 
ah gotcha.
 
It's the functional approach
:)
 
its silly looking now really
 
5:53 PM
@CharlieBrown - isn't 5'12" simply 6'0"?
 
range excludes the upper bound, so we just get 11
 
okay wasn't sure
 
Any of you guys had problem with observable.FirstAsync() not disposing the subscription?
 
no lodash
    var list = [];
    for(var f = start; f < end; f++){
        for(var i = 1; i <= 12; i++){
            list.push({
                Name: f + '\' ' + i + '"',
                Value: f * 12 + i
            });
        };
    }
    return list;
 
@TravisJ oh man I missed the f + and I was super confused about what was actually going on
@CharlieBrown <= 12 typo?
 
5:56 PM
balls, yes
 
return _.range(48, 95).map(function(i){
 return {
  Name: (i/12)|0+"'"+(i%12)+'"',
  Value: i
 }
});
 
% is probably the way to go
 
oh, mod, didnt think of that
 
oops, | instead of +, fixed
 
var heightItem = function(f, i) {
    this.Name = f + '\' ' + i + '"';
    this.Value = f * 12 + i;
};
// ...
list.push(new heightItem(f, i));
 
5:58 PM
@SpencerRuport - Changed names but not log reference, updated: jsfiddle.net/Lh2yywco
why call new twice?
 

« first day (1614 days earlier)      last day (3333 days later) »