« first day (1944 days earlier)      last day (3010 days later) » 

6:15 PM
 
If I am validating where or not a user has text written in a textbox, what do you think is better?

Doing the validation check insides a TextChanged event (Which fires each keypress) or on a TextBoxLeave event, when the user selects something else besides the textbox.

Pros to TextChanged = ErrorProvider error will disapear immediately for the user.
Cons to TextChanged = Does validation on each keystroke

Pros to TextBoxLeave = Only Validates when User leaves textbox
Cons To TextBoxLeave = User has to click out of textbox make errorProvider Icon go away
 
@Bardicer not that I know of :P
 
oh shit.. there are validated and validating events.... I will look into these
 
Pear, Banana, Donut, Ladies, Panini. Interesting.
 
user47589
ladies and panini are awesome
 
6:28 PM
Oh no page updated when I sent that, now its out of context
 
I have a web service gobbling up over a half gig of memory on startup. =\
 
Web Service or windows service? What is this web service doing??
Unless it's running on app fabric or something, those shouldn't be that huge :|
 
user47589
download more RAM
 
@RyanTernier - Yeah I'm kind of scared to find out.
Looking into it now.
 
@SpencerRuport Wear Goggles!
 
6:33 PM
did he say panini? Give this man a job!
 
Do you know guys what's the best change to change a career track. I've been doing like 5 years of windows desktop applications as my main job (with SQL besides) some ASP.NET as internal tools.
I'm studying as much I can the ASP.NET HTML, CSS, JS, Python (hate you) and Ruby on my spare time. I'm reading tons of books about ASP.NET working a lot to develop the skills. Good thing is that the C# et .NET skills are still useful when doing ASP.NET websites but well quite frankly there is still a big amount of things to swallow (ASP.NET is pretty vast I'm interested but what would you suggest to s
 
@EhouarnPerret Best change to change a career track is how you look at your career and where you want to go. It's all up to you. There are many choices available, but this is a big discussion
Some options:
1) Talk to your boss. Let them know your concerns, where you are and where you want to go. See what there is at the company to work towards and get goals setup for yourself.
2) Look at other opportunities. I always recommend that new developers TRY different business and jobs to see what they like. If you work at a small RD shop, try a larger company to see if you can learn a thing or two.
 
(I resigned from my company a couple of months ago =])
Well the thing that I was planning is going back to Europe for a while (I'm in China right now) going to a consulting firm where it's easier to start on another track.
and picking up of course an ASP.NET related mission that's my plan
 
@mikeTheLiar Do you have thoughts on my Textbox.text validation question. I'm actually leaning towards using the TextChanged event, unless someone tells me that just a plain terrible idea
 
First world problems - Your new headphones make the shitty quality of your music library readily apparent. =(
 
6:40 PM
@EhouarnPerret I would advise you to build a bunch of stuff and get experience. If you're already an experienced developer, you should be able to figure it out :)
 
I'm not afraid of switching and think myself capable to progress quickly was more concerned about how HR regard my profile...
Building a bunch of stuff, done at my office as internal tools, now I'm trying to go bigger on my spare time, would do more once I will be (really) off my current job (time-consuming).
 
Do any of you shift between languages / frameworks / technologies and then nearly completely forget the ones you arnt currently using?
@ehu
 
user47589
My first job was in Scheme development. I've forgotten 90% of Scheme.
 
@EhouarnPerret how do you manage to maintain a goodworking knowledge of all those things ?
 
@Michael well, I'll explain it the way my boss at the consulting company I left explained it:

you do one project in #technology, you are now a #technology expert

you do two projects in #technology, you are now a #technology guru
 
6:42 PM
@Michael I think with experience we're getting at adaptation as long as we are not stuck with the same technology =]
Right now killing myself everyday up to 3:00 am =[
 
I think that it's good to have experience with frameworks and tools and such... but the best engineers look at them simply as tools and choose the best tool for the job regardless of whether they know it or not
 
user47589
yeah
 
@Codeman but what if you do one or two projects in #technology, then switch to something else. 1 year later you move back to original #technolgy and you've forgotten what you've mastered.
 
@Michael you'll find that you remember things, I think
 
user47589
I'd argue you didn't actually master it, then.
 
6:44 PM
Okay let me put it his way, I completely agree with you, now it's more practically sometimes HR just don't give a damn they look more at keywords redundancy
 
@EhouarnPerret I'd say you shouldn't be applying to jobs through HR if you can avoid it
 
I guess I agree with @Amy
 
go to networking events instead
 
user47589
@EhouarnPerret yeah. HR doesn't understand anything about computing and just look for keywords
 
meetup.com
I've gotten 1 job in my career by applying through HR
 
6:45 PM
since Im so forgetful Idk what it would take to ever master something. I have a serious memory issue I think lol
@EhouarnPerret Going through people you know, who like you is best way In my experience.
 
user47589
when you've mastered something, it should be like riding a bike. even if you don't ride a bike for years, when you try again, you will be rusty for a little bit but it will quickly come back
 
yeah an alumnus told me so last time, he said don't bother that much about the tech
what matters is your manager and your workmates
if you can get along with both you would be happy then
 
@EhouarnPerret well... tech is important. If you're working on a shitty product and you're not empowered to make it better, that is frustrating
 
@Amy I have found physical mastery to be an entirely different beast (to) non-physical
 
I am happy right now because I am working on a pretty decent product AND I'm empowered (and encouraged) to make it better rather than just following the status quo
 
user47589
6:47 PM
Of course. I meant it only as an analogy.
 
(say that the prerequisite is the tech for the product is relevant =])
 
Have you guys ever watched an idiot abroad?
 
Hooray for metaphors!
 
user47589
yeah
 
user47589
Go metaphors go!
 
6:48 PM
@Michael fucking love that show, sad they took it off of netflix. Had to get a Hulu subscription
 
@Codeman You are not empowered. You are not prettty, you are a worse than an entitled java developper!!!! MWHAHAHA
 
my GF is watching it for the first time
@RyanTernier :(
 
Karl says that your brain forgets (old) things, to create more room for the new stuff you learn
lol seriously... me
 
user47589
We should swarm the Java room, tell them how awesome C# is!
 
@Amy bad idea...
 
6:49 PM
@Codeman Suck it up princess. You need a backbone exam every now and then after work at a cozy shop like MSFT ;)
 
user47589
i know :(
 
@RyanTernier backbone exam?
 
var isTrue = @"C#".Length < @"Java".Length;
might be true
 
IKVM makes using Java tollerable. just turn it into a .net libarary and win.
 
Groovy is all right.
 
6:50 PM
well lets make it "C#.NET".length > "Java".length
 
Kotlin IS fine
 
Kotlin is cool, but there's not much third party support
 
not yet
let's see how the adoption will be
 
my #1 thing to learn right now is GoLang
and maybe to get better at Node
though the ExpressJS drama makes me nervous
 
I remember when everyone thought Scala would be the next best thing
 
6:52 PM
yeah all JVM languages, Groovy, then Scala
then not that much broad adoption
 
@RyanTernier Scala is pretty rad, just never took off
 
(or vice-versa cant remember which was the first to be released, wikipedia is too far)
 
turns out "MapReduce all the things!" isn't necessary for most business applications
 
@Codeman so true!
 
@Codeman what drama
 
6:54 PM
@Failsafe the guy that has about 99% of the commits for expressjs left the project
 
woah
what does that mean for MEAN
 
You should use MHAN instead (Hapi.js)
 
@Codeman Every language is "rad" when it's needed. It's as you said: Languages are tools. How to implement those languages into a beautifully designed and architected application so it works as intended, that's another story.
 
@Michael are you just showing a label or a message box?
 
@mikeTheLiar

private void textBox_CaseNumber_TextChanged(object sender, EventArgs e)
{
TextBox _textBox = (TextBox)sender;
if (!String.IsNullOrWhiteSpace(_textBox.Text)) { errorProvider.SetError(_textBox, string.Empty); }
}
 
7:07 PM
Is all that you're validating that there's actually something in there?
 
@mikeTheLiar Yes, in this particular case
 
Are you looking for a more general answer or an answer for this specific case?
 
I guess both.

because I bet this validation will most likely change. I bet they will want to validate whether the CaseNumber is unique (doesnt exist already in the db)
 
Generally I'd say that you've got the pros/cons of the two options pretty well laid out. It's mainly personal preference.
If you're going to be doing something like that (checking against DB records) I'd definitely say on focus lost
TextBoxLeave rather
Because otherwise you're going to be hitting the db on every key stroke
Or loading all records in to memory
Neither of which are ideal
 
@RyanTernier pretty much :)
 
7:11 PM
@mikeTheLiar Okay thanks! I just wanted to be sure that OnTextChanged wasnt to strenuous at least in the above case (without hitting the db)
 
if I was building a bunch of algorithms that I needed to apply in parallel, Scala would be a great choice
if I'm building a BLOB (Boring Line Of Business) application, I'd choose C# every time
 
@Michael depending on the situation you might be able to get away with it. But it doesn't seem like premature optimization in this case
 
@Codeman nice definition of a what is a blob =]
 
When I look at functional programming, I look at the interoperability of the language in question. Most likely (well in Enterprise scenarios) clients need something that works with everything. Right now i'm pushing .NET core / Java, I might dig into Scala
 
yeah, if I was writing something like Tableau, I'd absolutely use a functional language
Scala is great because it has extremely simple interop with Java
so you can write some speedy fast well written code in Scala and plop it into your application/web code
 
7:13 PM
I get requests : We need an app that works on Windows Machines, but needs to work on a command line Solaris box, Linux and a Mac. Can you also make it web enabled to work with an iphone?
 
though the same is true for C#/F# ;)
 
Why not picking F# then
Hm too late :o
 
I'm loving .NET Core atm. wrote a command line tool for web service testing, works on everything. <3 it. It just takes in an XML file, attache a binary cert (F U Java Cert Store) and starts spamming web services to ensure they're working.
 
@RyanTernier .NET Core AKA ASP.NET 5.0 ?
 
@Codeman DNX mainly, but I just assume it's all under CORE ;)
 
7:16 PM
@mikeTheLiar premature optimization?
 
@Michael That's the only type of premature i'll stand for.
 
@Michael var prematureOptimization = Math.Sqrt(Evil.All());
 
so its bad lol
 
Three rules of optimization:
1. Don't do it.
2. Don't do it.
3. Don't do it.
 
7:18 PM
 
4. (For experts only) Don't do it.... yet.
 
I wrote a good post on optimization once...
Optimization is a hot potato that no one wants to touch, but everyone knows its needed. Writing Pre-Optimized code is one of the huge distinctive factors between a junior | Intermidiate | senior dev
 
Well I guess the problem is what you call pre-optimization, that's the bottom line.
 
When I write code, our architects get mad at me saying i'm writing pre-optimized code. However, that's just the way i write code after this many years of writing it. It's the proper way, the fast/optimized way. Why would I write it to behave slow?
I'd never write:
string foo = GetString() + getAnotherString() + getThatString() + NinjasRock();
I'd optimize that as I was writing it.
 
Depend if you can get that big picture as they like to say.
 
7:23 PM
That's not pre-optimization. That's just writing good code that is optimized.
 
@RyanTernier there's a difference between writing good code that happens to be efficient and writing clever code in order to make it efficient.
 
@mikeTheLiar On that's true.
 
The I read "premature optimization is the root of all evil" I think two things:
1) Don't solve problems that don't exist yet
2) Don't be clever for clever's sake
 
Take this clever code:
 Dictionary<long, Person> persons = new Dictionary<long, Person>();

            List<KeyValuePair<long, HCIM.Model.MessageModel.Attribute>> attributes = new List<KeyValuePair<long, HCIM.Model.MessageModel.Attribute>>();

            var dic =
                new Dictionary<Type, Action<MemRow, Dictionary<long, Person>>>
                {
                    {typeof (MemHead), CreateIdentity},
                    {typeof (MemAttr), CreateAttributes},
                    {typeof (MemDate), CreateDate},
 
@mikeTheLiar how does that apply to the context of my question?
 
7:25 PM
@Michael worrying about hitting the db on every key stroke. If that's a concern that you're likely to have you probably want to consider it.
 
@mikeTheLiar I think that is a reasonable and sound interpretation of Knuth's saying
 
Sure, it runs ~15% faster than doing it in a switch/if block, so 2ms vs 2.3ms on production. But it causes a performance degradation when someone tries to maintain it due to an error.
 
Like I said, depending on the situation you might be able to get away with it.
Like when the user and the database are 10 feet away from each other
 
@mikeTheLiar so worrying about it and avoiding the situation would be premature optimization?
 
But then you have to deploy to someone on the other side of the world and it becomes a problem
 
7:27 PM
so me deciding to NOT use the TextChanged() would be premature optimization?
 
Well, yes but with a caveat
You said that there's a likelihood that you're going to have to compare against existing database records
If that's something that is legitimately like that you're going to have to implement, then no, it's not. You're anticipating business needs.
Now we're getting into the question of YAGNI
 
It's more about expected behaviour
 
As of right now, the question is largely moot. There's no major difference between the two options other than nanoseconds.
 
Acid test: Is the optimal version at worst no less easy to understand than the naive version?
If so, just do it. If not, consider how important performance is, then maybe do it. Or, do it anyway.
 
But bring in round trips to the database and there's a significant difference between the two
 
7:29 PM
@TomW, regarding that dipshit with SSL,... I solved it. Partially, at least. :)
 
@EricWu yeah? Good news
what was the issue?
 
@Michael does that make sense?
 
This sounds like an incoming 'solution'
 
Dunno :)
Instead of loading the certificate from store, I import directly from the provided .p12 file
 
@mikeTheLiar uhhh
 
7:31 PM
and... it worked
 
what does 'import directly' mean?
 
certificate.Import(filePath, password, etc)
 
called where?
 
I updated my question
1
Q: Could not establish trust connection when accessing webservices within .NET Framework with certificate

Eric WuI'm trying to call a webservice (not mine), Service-Referencing it within Visual Studio 2008. According to it's owner, it requires a certificate, which they kindly provided for testing purposes. I'm an absolute newbie in certificates, SSL and else, so I could be doing something terribly wrong he...

the code is also there,... take a look at it
 
@EricWu - don't do that :)
@EricWu - Remove the update from your question, and post it as an answer.
 
7:33 PM
Ah. You did enable private key permissions for the account running the service, didn't you?
 
@TravisJ, but the question still remains
 
wait no
maybe yes
 
also, it doesn't fully answers my question
 
Guys, do you need private key permissions to use a cert for SSL?
 
@EricWu - It wont prevent future answers to post yours, it just allows other people who find that (if they also like your workaround) to at least verify it is a working solution or temporary solution
 
7:34 PM
Hmm,... fair point
@TomW, I didn't change any private key permissions... and since it is directly loaded from file, wouldn't make much sense to retrieve any other data from the store, .... would it?
 
Sorry, I don't understand the question
If I correctly understand how SSL works, the account presenting its own cert has to be able to use the private key contained in the cert to decrypt the traffic sent by the other party, who will have encrypted it with the first party's public key. However, you're talking about a server certificate, so your client should only have to use the public key
 
The way I originally did, I was retrieving the certificate from the key store in windows, so the fact that it wasn't being recognized _probably_ was something related to the latter.
When I changed the code to directly receive the certificate from the .p12 file (rather than installing it), it should retrieve all the necessary data from it, no?
 
so that's a no-go
WAIT
You've set the .p12 as the client certificate
And that worked?
 
hey
VPN virgin here
 
@TomW ... yeah?
now you're the one confusing me lol
 
7:40 PM
Where do I find the computer name?
 
@BrianJ Environment.GetVariable("MachineName") or something like that ;)
Environment.MachineName
 
ok I mean setting one up in real life not in code? :P
 
@EricWu I thought the problem was that the client couldn't verify the server certificate? Why would changing the way you set the client certificate make any difference?
 
I've enabled my work machine to accept vpn connects
now setting it up on my home pc
not accepting the computer name I supplied though
 
@BrianJ on your keyboard, hold down the windows key and then hit the pause key
 
7:42 PM
I gave it the ethernet adapter name from an ipconfig screen shot of the work machine
 
@TomW, I thought the same... which is why I didn't think that update was to be considered an answer :D
 
@kush ah I see pity I'm on my home machine now..
could I supply the ip address of the machine instead?
 
@BrianJ what difference does that make?
 
because I need to know the work machine name @kush
I have a screen shot of it's ip config settings
 
@BrianJ ah the machine you're connecting to?
 
7:44 PM
yes
the remote do hicky
 
just use remote desktop protocol?
 
I'm using the remote desktop connection manager on W10
 
time to eat some dogfood
 
why don't you use net view at cmd?
theoretically, since you're already at the same network, it should show up
 
but its saying rm desktop can't find the computer
I'm at home now
 
7:47 PM
are you trying to access it with mstsc?
 
@BrianJ ah so you need vpn just to connect to the work network so you can remote into your work computer?
 
^^
@kush yesss
saying it can't find the computer name
 
user47589
Listening to 1985 by Bowling for Soup. Love this song.
 
I've already set up the remote connection
 
7:49 PM
@BrianJ but you've not even connected vpn, have you?
 
Listening to - Let it happen (soulwax remix) :)
 
@BrianJ If the computer is on a domain but the computer is set to DHCP (not receiving an IP registered in DNS) the name probably wont work.

You probably need to insert the exact IP address of the machine
 
ok
I happen to have the exact ip address
that's the ipv4 right?
 
Yes
 
ok I put in the ip address, and
 
7:52 PM
@Amy comes on nearly everyday on my pandora 90s '00s now playlist
 
looks like some mofo turned off my pc ^^
 
@BrianJ no, what error were u getting before?
 
damm cleaners
 
@Michael they probably have set things up so you can't rdp outside their network
 
@kush he said he enabled it on his PC
 
7:54 PM
before I was getting the error saying the computer name wasn't found..now I tried with the specific ip address. It just seems that my machine has been powered off in the office
 
ah
 
no this error is worse than the first
so you were on the right track i think
Its so hard to tell.. without seeing what your doing though lol
 
@Michael so why does he need vpn?
 
have you tried pinging to make sure?
 
because his work network is probably on a domain thats locked down im sure
@KendallFrey good point. @BrianJ you could try pinging any computer names you know of with your CMD prompt
 
user47589
7:57 PM
i dunno, I tried setting up VPN at home last year, it's pretty confusing.
 
user47589
I ended up giving up
 
setting up a personal vpn?
 
Quick question how would you say the pragmatic programmer is structured
 
I'm just following the guide from work so someone must have vpn
at some stage
I'll try pinging
it
should be pretty straight forward anyways
 
just because you connect to the VPN doesnt mean you can RDP to your computer.
Like here at work, (we the IT department) try to make sure users can connect to our network, but cant RDP in.
 
7:59 PM
Bothers me that I only have a vague idea of what a VPN is
 
Its something virtual.
 

« first day (1944 days earlier)      last day (3010 days later) »