Open Side Menu Go to the Top

06-15-2012 , 08:51 AM
Thanks for all the comments/suggestions on TDD.

I have heard of unit testing and mock libraries, and have read/played around a little bit with Mockito in the Spring framework. Never realized you write the tests first though.

I wasn't in a formal CS program. My degree is a BS in Operations Technology, but I took as many programming classes as I could, then took a Java certificate program after graduating. (I did the BS as a continuing education student. My workplace wouldn't pay for a CS degree because it wasn't related to my job, but the Operations degree had a "software development" track, so I went down that route.)

None of my classes introduced IDE's, debugging, testing, version control, etc. (Maybe because I wasn't following their formal CS program.)

It's been a steep learning curve on-the-job, especially considering I only develop 20 hours per week, and continue to work in materials management the rest of the week.
** 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 **
06-15-2012 , 09:02 AM
Quote:
Originally Posted by Neko
If this video doesn't convince you to learn Erlang....Nothing will.

http://www.youtube.com/watch?v=xrIjfIjssLE
Erlang is one of those languages I'd learn if I ever had a use for it anymore. But nearly everything I do for money is PHP the last few years... *sigh*
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2012 , 09:26 AM
Roundtower,

I think that is definitely a valid argument against the latter two. hmmm...will have to ponder more.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-15-2012 , 10:04 AM
Quote:
Originally Posted by Neil S
Erlang is one of those languages I'd learn if I ever had a use for it anymore. But nearly everything I do for money is PHP the last few years... *sigh*
The key is obviously to sometimes do stuff for other reasons than money :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2012 , 11:02 PM
Hi I was looking for a summer unpaid internship for jr / entry level .net programmer...

I got probably 5-6 smaller offers... I got one on Friday from a company saying they are interested for someone as they do mostly jquery mobile web development for a contract job.. Also in his email he asks what would be my desired starting hourly rate...

Honestly I dont care about salary now, I just want a job to get to get into the field. I am fine doing an unpaid internship ( ask I talked about in my cl add which the company responded to). I am roughly intermediate at most of the web devel stuff, and wanna learn.

Whats my play?

thx
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-16-2012 , 11:57 PM
Quote:
Originally Posted by tercet
Hi I was looking for a summer unpaid internship for jr / entry level .net programmer...

I got probably 5-6 smaller offers... I got one on Friday from a company saying they are interested for someone as they do mostly jquery mobile web development for a contract job.. Also in his email he asks what would be my desired starting hourly rate...

Honestly I dont care about salary now, I just want a job to get to get into the field. I am fine doing an unpaid internship ( ask I talked about in my cl add which the company responded to). I am roughly intermediate at most of the web devel stuff, and wanna learn.

Whats my play?

thx
and you are posting this on a poker site? you want the internship AND the money obv, and you are asking how to get it imo. I say you need to answer in such a way that what you actually mean has to be interpreted at LEAST a little. something like "Nothing out of the ordinary, I'm happy just to be working."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 01:10 AM
Quote:
Originally Posted by Ryanb9
something like "Nothing out of the ordinary, I'm happy just to be working."
perfect imo (but I nothing about internships!)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 02:32 AM
Is there a way to do this (even if is hackish):
if( x == y) foo1() : foo2();
where foo1() and foo2() both return void?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 02:37 AM
What language is that supposed to be?

Are you looking for the ?: operator?

In a C-derived language that doesn't parse. If you mean ?: then return types don't matter.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 02:55 AM
Quote:
Originally Posted by Chips Ahoy
What language is that supposed to be?

Are you looking for the ?: operator?

In a C-derived language that doesn't parse. If you mean ?: then return types don't matter.
yes i meant to say x == y ? foo1() : foo2() ;

I am trying in c# and i get
Quote:
Error Type of conditional expression cannot be determined because there is no implicit conversion between 'void' and 'void'
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 03:02 AM
Code:
if(x == y) { foo1(); } else { foo2(); }
Would be pretty basic and standard C. I'd be surprised if MS disallowed that.

Not sure what I'm missing here in intent.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 03:09 AM
Quote:
Originally Posted by Neil S
Code:
if(x == y) { foo1(); } else { foo2(); }
Would be pretty basic and standard C. I'd be surprised if MS disallowed that.

Not sure what I'm missing here in intent.
I would like to use the ? instead of if else because 1 line if/else statements look weird.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 03:17 AM
y'know what's better than both the ternary operator and one line if/else?

Spoiler:

Code:
if(x == y) {
  foo1();
} else {
  foo2();
}

Last edited by tyler_cracker; 06-17-2012 at 03:18 AM. Reason: it's a classic for a reason!!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 03:35 AM
Quote:
Originally Posted by Ryanb9
yes i meant to say x == y ? foo1() : foo2() ;

I am trying in c# and i get
Parenthesis. You should use them. The right time to use parenthesis is anytime any reader might not be 100% sure about the grouping.

I am a reader, I'm not 100% sure of the ordering. I do note that if that is

Code:
x == (y ? foo1() : foo2());
then complaining about void suddenly makes sense.

Quote:
Originally Posted by Ryanb9
I would like to use the ? instead of if else because 1 line if/else statements look weird.
You're right that 1 line if/else statements look weird. You're wrong to use ?:.

About the only place ?: looks right is in #macros. Always write for the reader, ?: is rarely reader-friendly.

tyler posted the correct answer. As soon as you are done with the if(), put the {} in with the line breaks. Then fill in the inside. When you don't have the {} that creates a mental block against putting 2 or more statements inside the if. Or, god forbid, you end up doing the classic:

Code:
if(foo())
    bar();
    zed(); // I think this is part of the if!
OtherStuff();
Just teach your fingers to put {} as soon as you put if() and that's one more thing they'll do well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 03:37 AM
in languages where functions are first class objects, you can do something like

function_to_execute = ( x == y) ? foo1 : foo2;
function_to_execute.call();

or if you want to get cute:

(( x == y) ? foo1 : foo2).call();

but i think tyler is right
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 04:21 AM
Yup. Also it simply doesn't make sense to try to use the ?: operator when the second and third arguments are void.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 08:09 AM
I was offered to teach an online seminar thingy about simulation. I really don't know too much about it and would have to relearn a good chunk but it seems like it could be fun.

If anyone knows reference books or something they can recommend let me know. It'll probably be very practical, basically simulationg a bunch of stuff with a bunch of tools + some theory background. Intended audience is non-programmers I think so no "write your own simulation" but more "use this petri net tool" etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 08:22 AM
Sounds interesting! What sort of simulations are you talking about though?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 08:29 AM
I can pretty much build the entire seminar the way I want. I was thinking about stuff like Markov chains, Petri nets, some cellular automata maybe and some process models.

The simulations will be business centric so stuff like the beer game, ordering systems and so forth

My first thought was splitting it into discrete, continuous and maybe agent based simulations (I do teach AI after all) but that's as far as I've thought it through
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 12:08 PM
Quote:
Originally Posted by Neko
Yeah, you are almost certainly doing something very very wrong if you're having trouble installing python packages. Pretty much everything can be installed by downloading the package, unzipping it and then from the command line:

Code:
python setup.py install

Even easier is intstall setuptools/pip and then you can just "pip install somepackage" and it will download and install it for you.


There are a few packages that can be a bit of a pain in the ass to get to build correctly using "python setup.py install" but for those there are usually pre-built binaries available (numpy/scipy/matplotlib etc)
i told you guys i am really a n00bie here. so i am trying to install this python lxml package. so i download it in the .tar.gz file offered, and then unzip it to my desktop. then i go to start->run->cmd and navigate to desktop and to the unzipped files and then i type in "python setup.py install" and it says "python not recognized as an internal or external command"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 12:11 PM
okay i changed it to do "setup.py install" and it does stuff now but i am getting an error installing it let's see here...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 12:27 PM
wow need to install libxsalt and some other nonesense something to do with C too confusing to use stupid lxml
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 12:48 PM
uh yeah xml sucks and is slow and expensive to parse, hence C components. this is why cool kids now use json and yaml. and thrift.

but hey, those other libraries are just EXEs right, so your problems are solved?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 12:48 PM
also the fact that running "python" in a shell doesn't work means that your python installation is borked (and/or that you need to add the python interpreter to your PATH).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-17-2012 , 01:04 PM
hey tyler are you making fun of me?

i just added python to my path. why did i want to do that?
** 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