« first day (1069 days earlier)      last day (3880 days later) » 

12:00 AM
a interviewer was saying how you lose points for staying in a job more than 2 years
 
only to see them go, not a great business model
 
I believe that as a programmer you learn quickly, and as someone who cares about quality, you get frustrated when you hit road blocks, so if you haven't seen something to make you leave after 2 years you aren't looking very hard
 
I agree with Ryan
but it depends on the job
 
Out of the 20 people i've interviewed in the past year, I've hired 5.
 
but anybody who jumps ship every 1-2 years isn't going to be somebody who I want to invest in
 
12:01 AM
I wouldn't invest in the programmer
 
hiring is a real investment
 
no, hiring is filling a seat
 
unless you're doing commodity level programming, hiring a programmer is a huge investment
 
I don't want to be a programmer for the rest of my life. I'm working my way into team leadership / management
this company, CGI, is a great place to get this experience.
 
ick
I'll never do management
I want to learn until the day I die
 
12:02 AM
Haha
 
if I find myself stagnating, I move
 
Yea, as a dev if you get that feeling it's time to change somethign up
I run the MS practice here at the office, so I always push to go to Tech events
 
@deltree -The implementation lags if you try to search the large data set. It will only get worse with more complex data. And it is using a fixed width for the cells. As larger strings are used for data that cause the cells to resize it will get worse. Typing in the search bar with the large data set items nearly crashes my browser.
 
it's a good excuse to go get toys and a great experience.
 
Collection.AsEnumerable().Where( c => c == bad).ForEach(c => Collection.Remove(c));
 
12:03 AM
there is no IEnumerable<T>.ForEach
 
@TravisJ as I said, 100k rows is too much to search
@TravisJ 30k is fine
 
and I'd just use a normal foreach in that case anyways - side effects in queries, or things that look like queries, is ugly
 
alright, i'm out to try to make a better long island ice tea than yesterday. Cheers
 
@RyanTernier the tendency for american programmers is just to go get drunk at the conferences, not a good company expense
 
@Pheonixblade9 AsEnumerable() on a collection is, for most collections, just giong to return itself (ie: have absolutely no effect)
 
12:04 AM
see ya
 
Hey, guys!
just one question if you don't mind
 
welcome
no questions
:)
 
@RyanTernier I'd love to stay in a job more than 1-2 years. But the fact is, you aren't rewarded for it. you generally get more money/more promotions by hopping jobs. If that changed, the "hop jobs often" mentality wouldn't be so popular.
 
@deltree Oh, that's disappointing :D :D
 
@Pheonixblade9 I completely agree, I've doubled my salary twice in 2 years by moving to better opportunities
 
12:06 AM
@deltree do you really mind me asking? :)
 
no
 
HE SAID NO QUESTIONS
 
@Pheonixblade9 I tend to find, though, that the best developers aren't (solely, or even mainly) financially motivated most of the time. Even if they are, there's always opportunity without jumping ship. Even the threat of it can change things
 
lol
 
@KareemMesbah What's your question?
 
12:06 AM
@ReedCopsey you're right, the best devs are motivated by the technology, which is why I told Ryan to jump ship
 
@deltree I'm not American, and I've only been drunk once in my life (25 shots of vodka).
 
@ReedCopsey my primary motivation is not financial. For example, I get paid well, but not extravagantly at my company, but I work 35-40 hours a week, management is awesome, and it's a great work environment where my work matters.
 
@RyanTernier you need to get out more
 
yeah - I very rarely lose devs - they like working on my codebase too much, since it's actually interesting
 
@Pheonixblade9 calm down man I had no questions =))
 
12:07 AM
I could go work at Amazon and make 50k more and work 80 hours a week and take years off my life, but I'd rather enjoy it :)
@KareemMesbah I was just joking :)
 
@Pheonixblade9 Yeah - that's how I try to manage my staff, too
 
@deltree Why should I get drunk? I'd rather save my money on booze, take my girl down to Mexico and get drunk down there where it's 1% the cost
 
@Pheonixblade9 me too :)
 
(though I do say 35 hours / week is awfully low :p )
 
@RyanTernier but you don't
 
12:08 AM
@ReedCopsey well, if I'm getting my work done, would you have a problem with it?
 
nope, not really
 
@deltree Oh but I do. Pheonix this Xmas. :)
 
(and I mean 35 hours a week if you don't count lunches - I'm generally here 9:45 - 5:15 or 5:45
 
but there's no "done" in my company ;) the work is endless
 
@ReedCopsey you are thinking like a manager, not a developer
 
12:08 AM
One thing I love about tech jobs is the Flex. Today I'm working 10 hours. Tomorrow, i'll work 5 at work, 2 at home. Friday i'm flexing and am off at 2
 
@RyanTernier excellent, I love desert air
 
@RyanTernier you may NOT have me for christmas.
 
@deltree I'm both - so it really doesn't matter
 
@Pheonixblade9 No one wants you for xmas... maybe april fools... but even then.
 
@ReedCopsey well, of course. But I get my sprint work done consistently every sprint.
 
12:09 AM
@ReedCopsey you know that if you do both you can't do either well ;)
 
@deltree I'd argue that isn't true, but heh, what do I know?
 
So are JIT the same as interpreters except that interpreters translate and execute code on a VM or something and JIT translate code into machine code?
 
I have 300 pages of design to read through, create work packages, and train a new dev that started today. <3 this month.
ok now i'm gone - cheers
 
@RyanTernier I agree, though I've been pulling lots of hours lately, 60+ each week because I want to get projects done
hourly ftw
@ReedCopsey I'd argue I know what I'm talking about, but I've been wrong before
 
@deltree @Pheonixblade9 and @ReedCopsey any answers?
 
12:12 AM
I don't know what an interpreter is in this context
 
I meant the process of interpretation in general
 
@KareemMesbah Sort of - the JIT does is really more compilation. It's changing from a semi-compiled state (the IL) into the executable code on the platform in question
you could make something that ran as an interpreter and executed the byte code
a JIT goes one step further, and actually does dynamic translation of the byte code into actual machine code, so you're executing native code on the platform
 
@deltree - In the table implementation I use, the search filter can use !. It is a nice feature, maybe you can add that into yours?
 
and good JIT implementations will do their own platform specific optimizations in the process
 
I'd be happy to. Currently my search filter is inclusive rather than exclusive
 
12:14 AM
search[ 5 !1 ] returns all values that contain 5 but not 1
 
so it does an "any" match, rather than "all
so I'll need to add an inclusive/exclusive flag
or perhaps just a number of filter options
since it's flexible enough to allow you to implement your own filters
 
Does your sort work on date?
 
@KareemMesbah a JIT? you're talking about Java or Javascript?
JIT compilation?
 
Ah, clock lol
 
It does and it doesn't. Date's require a custom sort function, which I explain pretty well
 
12:16 AM
I gotta take off
 
@ReedCopsey Is JIT translates the IL code into machine code during each program execution?
 
in the readme
@TravisJ bye
 
later
 
@KareemMesbah Yes
@KareemMesbah The wiki page is quite good at describing it: en.wikipedia.org/wiki/Just-in-time_compilation
 
@Pheonixblade9 I am talking about the process in general. Will it matter to be talking about Java or JavaScript or anything else?
@ReedCopsey I actually went through some of this but what I'm actually confused about is that if interpreters does the same idea of JITters then why do they both exist and what's the advantage JITters over interpreters?
 
12:19 AM
interpreters don't actually translate into machine code
they read an instruction, and perform an operation based off it
JIT actually takes the instruction and compiles it into code that runs on the native platform
and then caches that compiled result
(so the next time it's called, it just runs the native code directly)
interpreters are easier to write (fewer steps), and simpler conceptually, but JIT can offer huge speed improvements
 
so... was thinking about forming an LLC so I can subcontract more easily
thoughts/
 
@Pheonixblade9 Why would it be any easier?
 
@Pheonixblade9 I just did that actually
@Pheonixblade9 all costs accounted for it's about $350 in my state
 
@ReedCopsey if I form an LLC I can pay the subcontractor from the LLC, not from me. So I won't double pay taxes
 
I used legalzoom
 
12:22 AM
@ReedCopsey so the first time a program that's translated with a JITter runs is theoretically slower than the next times?
 
it's less than $100 I think
 
it's like $150 in my state just fees
 
yeah
I need to find an accountant
 
$99 for legalzoom and I also had them get me a taxid
 
@KareemMesbah Yes - which is why if you're doing timings in C# or Java, you have to run the code more than once to get good timings. The first time, the JIT will influence it
 
12:23 AM
and you are set for getting subcontractors and such?
 
I should be, haven't changed jobs yet
but I needed the business anyway
 
huh
cool
I g2g - let's talk tomorrow
cya!
 
might want to hire a driver/secretary
 
@Pheonixblade9 You should be able to avoid the double taxation in any case, as it's a legit cost of doing business, so even without an LLC, you could deduct that
 
@ReedCopsey well, that was my one question :D Thanks for help! :)
 
12:25 AM
@ReedCopsey he means the company gets taxed then he gets taxed. He can't deduct the company's taxes because it's not his company
 
time for me to get going, too - cya
 
 
5 hours later…
5:27 AM
Good day :)
 
 
1 hour later…
6:37 AM
can declare the const pointer in C#?
 
does c# has pointers ?
 
yes
u can use it in unsafe mode
 
:0
oh i didnt know :P
you mean ref and out ?
 
check this for further information:
 
i didnt know. may be in unsafe its possible
3
Q: C# equivalent of a const pointer/pointer to const in C++

lysergic-acidI am learning the basics of C++, coming from the .NET world (C#). One topic i found interesting was the const keyword and its usage with pointers (const pointer/pointer to const). I'd like to know if there's any C# language equivalent of the const pointer/pointer to const that C++ has? (I know ...

usually pointers are a headache in oops. using them efficiently is difficult. i never knew existence of pointers in c# :P
 
6:45 AM
tnx @codebrain
 
:)
 
 
1 hour later…
8:12 AM
hi all
 
hey jasper
 
hi code
How r u?
i have one doubt
in my view i create a dynamic radio button the sample code of this is as follows..
@for (int i = 0; i < Model.ChManufacturer.Count(); i++)
                            {

                                if (@Model.ChManufacturer[i].Text == "Select ...")
                                {
                                }
                                else
                                {
                                <td><input id="manufacturer" type="radio" name="Manu_rbgrp" value="@Model.ChManufacturer[i].Text">&nbsp;@Model.ChManufacturer[i].Text
                                </td>
My Problem is i load radiobutton dynamically with same id.. So with the use of same id i need to get the radiobutton value..
But the fact is that only one radiobutton is firing the javascript function.. Others not firing.. why?
@code
@codebrain
 
if all radio has same id how can you do that ?
 
mm ya thats what i asking
 
concatenate some value to id
 
8:21 AM
Okay suppose if i concate it to the id means how i call the javascript function..
<script type="text/javascript">
    $(document).ready(function () {

        $('#manufacturer').change(function () {
            var selection = $('#manufacturer').val();
            //poolvalchange();
            GetPatternDetails(selection);
        })
    });

</script>
 
<input id='manufacturer+@Model.ChManufacturer[i].Text+'
 
ya but in javascript function how i give..
 
@JasperManickaraj no ya. concatenate during creation of the control.
 
$('#manufacturer').change(function () {}
 
no, dont do it like that.
 
8:23 AM
then what i have to do?
 
if suppose this td comes under a table "tblRadios" then
$('#tblRadios input#radio').click(function() {
}
based on the id/value/index of radio do the task
 
ya i will check it @codebrain.
not firing the javascript @codebrain
 <table id="tblRadios">
                        <tr>
                        </tr>
                        <tr>
                            @* <td>@Html.DropDownList("manufacturer", Model.ChManufacturer, new { id = "manufacturer" })</td>*@
                            @for (int i = 0; i < Model.ChManufacturer.Count(); i++)
                            {

                                if (@Model.ChManufacturer[i].Text == "Select ...")
                                {
                                }
@codebrain
 
i wrote some random script ..
check google for that ..
i just gave idea on that
brb after lunch !
 
9:05 AM
yup sure @codebrain
 
9:40 AM
Hi Everyone!
 
Hey
sweetrascal ? weird nick.
 
thanks :-)
 
lol
@action halo
 
am trying sample application using grid view in simple asp.net application
 
ok good.
 
9:44 AM
in that i added a hyperlink for all values in column
 
one dedicated column for some link like edit or delete.
 
yeah similar this is for select
 
okay
 
when user select/click the cell value, i need to call server side code using ajax
 
ok, you have a specific value of which record has been clicked ?
 
9:46 AM
Morning folks
 
$(document).ready(function () {
$('.getUserbyID').click(function () {
var userID = $('#getUserbyID').val();
console.log(userID);
$.ajax({
type: 'POST',
url: '\Default.aspx\getUserDetailsbyID',
data: "{'userID':" + userID + "}",
onSuccess: function () {
console.log('Success');
},
onError: function () {
console.log('Fail');
}
});
});
});
 
  $.ajax({
                      type: 'Post',
                      cache: false,
                      url: somepage.aspx,
                      data: { 'variable1': value1, 'variable2': value2 },
                      async: false
                  });
 
this is the code i used to call tha server code
 
ok
@MadaraUchiha Hey
 
but i cant reach to server side code
 
9:48 AM
I'm helping my brother with some C# homework (I'm a PHP dev originally, I know next to nothing about C#), and I've run into a problem with recursion.
I have the following:
    public static int mana(int mone, int mehane)
    {
        int count;
        if (mone == 0)
            return count;
        count++;
        return mana(mone - mehane, mehane);
    }
 
@rk_sweetrascal have breakpoint and check if its going. otherwise your url in the ajax may be incorrect.
 
Now, it fails because count has no initial value, but if I use count = 0; the result would obviously be 0 no matter what I input into the function
(The goal is to return the division result using only + and -)
In PHP we have static $variable = 0; which would run at only the first iteration, does C# have something similar?
 
@MadaraUchiha use nullable type and declare it null initially ?
 
@codebrain ?? XD
 
yeah lol
 
9:50 AM
But if I null, can I still go count++?
Also, what's a nullable type? Int instead of int?
 
no, that could end up NRE.
 
I am confused then :D
 
no, nullable type is a primitive type can hold all possible values of its own type and null also.
 
how do I declare that?
 
9:52 AM
Okay, and then wouldn't it have the same problem as int count = 0;?
Wouldn't the function return null regardless of what the result is? (Also, how do I do the actual counting then?)
 
@MadaraUchiha haha let me think , not too fast. i am a newb too.
 
XD
@codebrain What I initially thought to do, was to have the bottom number subtracted from the top several times, until it's 0, counting how many times it took place in the process, and returning that.
 
@MadaraUchiha if it doesnt become zero ? like non divisible number ?
 
Can any one help me with sql server problem?
 
@MultiThreader sql :0 ask. if i knew i could. i am not so good at it.
 
9:58 AM
@codebrain It can be assumed that it will.
 
@MadaraUchiha okay. let me give you another solution for that then. gimme few mins
 
public static int mana(int mone, int mehane, int count = 0)
{
    return (mone == 0) ? count : mana(mone - mehane, mehane, ++count);
}
@MadaraUchiha
That should do exactly what PHP would with the same code
If using VS2010 you should be on C# 4, which is required for the option param
 
:11880510  public static int DivisionCounter(int topValue, int bottomValue)
        {
            int count = 0;
            if (topValue != 0)
            {
                topValue = topValue - bottomValue;
                count++;
            }
            else
                return count;

            return DivisionCounter(topValue, bottomValue);
        }
 
Bonus being it's stateless as well, static $count; in PHP would cause issues on the second call unless you reset it when you returned the value
 
10:08 AM
@DaveRandom That's awsome i would star that !
 
Does C# optimise out tail recursions? And would the compiler be intelligent enough to pick up a ternary as a tail recursion?
 
I don't believe it does
 
conditional operator ?
 
f# might though.
 
10:11 AM
yeah, i just landed there too
> The CLR itself does support tail call optimization, but the language specific compiler must know how to generate the relevant opcode and the JIT must be willing to respect it. F#'s fsc will generate the relevant opcodes (though for a simple recursion it may just convert the whole thing into a while loop directly). C#'s csc does not.
 
That sucks a bit. I'm not sure the JIT speed argument holds up, although I guess it would for a more complex routine
 
@codebrain I do believe that I'd run into the same problem with this
@DaveRandom that's good, but they haven't covered optional params (at least according to him), so that should be a different solution.
 
@MadaraUchiha you can do conditional operators with an overload instead
Foo(int n) { }
Foo() { Foo(0); }
 
@MadaraUchiha ...and self-researched solutions wouldn't be acceptable? :-(
Anything else would be stateful, which means they are teaching things the wrong way (IMO)
 
and fwiw, i think static analysis bitches about default param values since they aren't CLS compliant
 
10:16 AM
@DaveRandom Oh, but it's given in the question that the function only accepts two numbers :X
@DaveRandom They are teaching things in the wrong way.
 
and you can have weird issues where:
interface IFoo {
  void Bar(int n = 0);
}
class FooImpl : IFoo {
   void Bar(int n = 1);
}
var a = new FooImpl();
var b = (IFoo) a;

a.Bar(); // a.Bar(1);
b.Bar(); // b.Bar(0);
 
@drch That is just stupid
(of the compiler)
 
its just something to be aware of
 
Foo Foo Foo !
 
i wonder if you get a warning via static analysis or r# when you do that. gonna check
 
10:21 AM
@MadaraUchiha I mean at the end of the day, the simplest answer (and I guess the one they are looking for) is going to be keeping count as a private class member, I'm not aware of any mechanism for static method vars and overloading is just needlessly complex IMO
 
@DaveRandom They teach C# without touching OOP
 
Also remember you'd need to reset it to zero at the point where you return count;, or the next call won't start at zero
 
I haven no idea how or why, but that's how it is
 
@MadaraUchiha
 
hmm nope. no issues from either.
 
10:24 AM
If you're not going to touch OOP then Python would be a much better teaching language
 
if you set all rules on for analysis, you get CA1026: Default parameters should not be used
 
@drch That is just classic MS. Add a feature, then complain when people use it.
@MadaraUchiha I give up I think, I can't come up with anything sane that uses neither an optional param nor a private field
Both of those I'm sure you could figure out for yourself because they are exactly the same as you'd write them in PHP, only with type declarations and no $s
 
@MadaraUchiha does it say that the actual method that takes 2 params needs to do the recursion?
public static int mana(int mone, int mehane)
{
    return mana(mone, mehane, 0);
}

private static int mana(int mone, int mehane, int count)
{
    return (mone == 0) ? count : mana(mone - mehane, mehane, ++count);
}
 
@drch lulz, nothing like a good cheat
 
10:39 AM
also, does the problem specifically say use recursion? you can just write it as a while loop instead
 
Indeed, in fact most tail-call optimisations would reduce it to a while loop
@MadaraUchiha Actually I didn't really read it properly before, you need to mone < 0 otherwise mehane must be a factor of mone or you get infinite loop and eventually (since it's recursive and there's no tail-call) stack overflow
 
@drch i have a small doubt.
 private string name = string.Empty;

 public string Name
{
  set
    {
      name = value;
    }
  return
    {
      reutrn name;
    }
}
this and public string Name{get; private set; } are same ?
 
Can anyone explain why a RuleSet would have many Rule objects...in what order would they get executed? (msdn.microsoft.com/en-US/library/…)
 
@codebrain er not exactly
private string name; //initialised by default to null

public string Name { get { return name; } }
is roughly equivelant to public string Name {get; private set; }
from a callers point of view, anyways
 
@drch yeah, what is the use of private set ?
 
so you don't have to declare the field
 
oh oh :) thanks. Cleared myself now.
 
its just less typing cause programmers are lazy
// property with backing field
private string _name;
public string Name { get { return _name; } set { _name = value; } }

// auto-property
publc string Name { get; set; }

// read-only property with backing field
private string _name;
public string Name { get { return _name; } }

// read-only auto property
public string Name { get { return _name; private set; } }
but then again, it may also make sense for you to have something like this:
private readonly string _name;
public string Name { get { return _name; } }
because the keyword readonly means something slightly different
specifically, something marked readonly can't be written to and also has to be initialized when its declared or in the constructor.
 
11:04 AM
@drch :0
Thats a great answer man !
i have a problem with my mvc app. with return view("view",model); statement
:11882108
default index controller return all users profiles.
in the same view i have a dropdown to filter search criteria.
when user selects some filter option, i go to another action search users
and return it to view using
return view("index",model);
everything seems good. but the result just overrites the users on the browser and not displaying the new set.
@drch ?
 
i don't completely follow
return View("ViewName", Model) renders the view named "ViewName" with the model Model.
 
let me explain clearly
initially index action fires, it loads all users and goes to viewmodel and viewmodel's object to view.
so now i see all users in my browser.
i have a dropdown to search particular users added in last 10 days. when user select such criteria, it loads some users and returned to view via return view("Index",model);
but i still see all the users in browser instead of only the search results. kinda the view is not refreshed but over written.
 
11:22 AM
are you 100% sure you're hitting the correct action on the second page?
and not Index()
 
yeah, my action brings proper results on search query, if after search i have 3 users in the list i can see foreach inside my razor loops 3 times but it just displays all records
kinda overriting to the existing data in the view instead of loading it with new users
@chukwu ^^
 
11:41 AM
Solved it !
thanks for listening.
 
12:00 PM
@DaveRandom ah, didn't catch it the first time...implemented a lot without this knowledge... :(
 
hi all.
Have one doubt/..
how to get image name on click it..
i have this.. @foreach (var item in Model.FirstOrDefault().ChPattern)
{
<div style="width: 120px; float: left;">
<img align="left" class="patterns" value="@item.Text" title="@item.Text" alt="@item.Text" src='@Url.Content("~/Content/themes/default/ipatternThumbnails/" + @item.Text + ".jpg")'/>
<br />
<div>@item.Text</div>
</div>
}
@pooja @VijaySankar @Thio u all are having same Avator..
;)
 
@JasperManickaraj Yeah, it's probably a gravatar or SO bug
 
yup @KendallFrey
@KendallFrey how was the day... did u saw my Question?
 
Your ASP.NET one? I don't do ASP.NET
 
its js..
Javascript..
 
12:13 PM
Where?
 
!! morning
 
@dirt That didn't make much sense. Use the help command to learn more.
 
how to get image name on click it..
i have this.. @foreach (var item in Model.FirstOrDefault().ChPattern)
{
<div style="width: 120px; float: left;">
<img align="left" class="patterns" value="@item.Text" title="@item.Text" alt="@item.Text" src='@Url.Content("~/Content/themes/default/ipatternThumbnails/" + @item.Text + ".jpg")'/>
<br />
<div>@item.Text</div>
</div>
}
@KendallFrey
hi @Neha Welcome
 
That's not javascript
 
@JasperManickaraj hey thx
 
12:15 PM
i said that i need to get the value of image using javascript..
 
The value? What value?
 
hmm @Neha... See my Question
img value
<img class="patterns" align="left" src="/Content/themes/default/ipatternThumbnails/Bermuda.jpg" alt="Bermuda" title="Bermuda" value="Bermuda">
 
Hey guys. Can anybody here point me to some guidance on versioning inside an application? I have coded some business rules, but I don't want to lose existing versions of business rules when changes come around.
So I was thinking of versioning each rule
 
@JasperManickaraj wrap ur image with link & use javascript click of that anchor tag & get img name text
 
and passing the version as a command line option
 
12:17 PM
@JasperManickaraj What value?
 
Bermuda
 
@JasperManickaraj some SO ans :
function getImagesByAlt(alt) {
var allImages = document.getElementsByTagName("img");
var images = [];
for (var i = 0, len = allImages.length; i < len; ++i) {
if (allImages[i].alt == alt) {
images.push(allImages[i]);
}
}
return images;
}

var myImage = getImagesByAlt("Myimage")[0];
jquery : $(this).find('img').attr('alt');
 
@neha i sec
 
$("#urdivid > img").each(function(i, ele) {
$(ele).attr("alt");
});
@JasperManickaraj do the google yar.. there hundreds of options
ok bbye now
c ya
 
 
2 hours later…
1:56 PM
^ No it wasn't
 

« first day (1069 days earlier)      last day (3880 days later) »