The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Well, you've got 1-9, where all digits except 0 appear once.
Then you've got 10-19, where 1 occurs 11 times, every other digit, including 0 now, once.
Then you've got 20-29, where 2 occurs 11 times, etc.
by 90-99, we have all digits in count except 0 which lags by 10 (every digit occurs twice in each set of 10 except 0 which occurs once, so you've got 10 sets, so 0 lags by 10. (every other digit in the set x0-x9 occurs 11 times).
100 - 109 - Now 0 makes up for a lost digit, but loses out again in the 1n0-1n9 (where 10 > n > 0)
Ultimately, at 1000, 0 should still be the least frequent digit, and 1 gets a head start on everyone else.
I think I thought that through properly, but my brain is still fried mapping XML to bizarre property fields in strange class relationships that someone else wrote and where all the rules are embedded in the business logic for creating said entity containers.
So one of our customers requires me to have an account in their system. The account gives me an email @theircompany which I cannot access without VPN and I can only make VPN in a VM which does not have an email client installed. With the account I also get access to another account which gives me access to their servers, which I need to release software.
For the past six months or so I've been logging into their systems on a weekly basis, but somewhere in December I suddenly couldn't log on anymore. Turned out, because I failed to extend my contract, which only involved changing some value on my profile on their website, they just locked my account. I didn't even know I had to extend my contract, last time I've made that mistake.
So, of course I emailed our contact who referred me to someone who could make a request for me to have my account restored. Of course they sent all emails to my @theircompany account which I could not access at all without VPN which I didn't have because they blocked my account. Took me about a week or two to get my VPN and account access back.
But then I still needed access to the server... Long story short, I've talked to three people about it, filled out some forms, at least five people needed involvement (because I needed to get "approval" of two people), the help desk people weren't able to fix it for me, two more people got involved and almost two months later I still don't have access to their servers and six people are involved...
Who the hell comes up with these idiotic policies? Why the hell can they close an account automatically, but is it nearly impossible to get it back? Ah well, I'm not working for them at the moment so I'm not in a hurry and I can see the humor in it
Who the hell comes up with these idiotic policies?
The Russians are responsible.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 - You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 - When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
I am conducting a round of interviews this week, looking for a mid-level C# developer. I'm down-selecting some tech questions which are aimed at trying to filter out the "Yeah, I did a C# project a couple years ago" crowd from the "C# has been in my blood for at least a year or two" folks.
But selecting appropriate questions is always a challenge. (Just because something is obvious to me, doesn't mean every developer has encountered it. Every project is different and people get exposed to different things. I definitely want to avoid "language trivia.") So here is my first cut of questions. For those of you who are .NET devs, would you agree that somebody with a couple years of solid experience should be able to talk intelligently about most of these topics? (Not all of these are C#-specific.)
How do you inherit a class, and why might you want to?
What is the purpose of interfaces, and how are they helpful?
Why would you ever want to make a method private or protected?
When might you use a static class or method?
Can you explain what a lambda is, and why you might use one. (Or, alternatively, LINQ?)
Why might you use a property instead of a regular variable? (How are they different?)
Are you familiar with any "Design Patterns"? Can you name one or two that you have used?
Have you heard of the concept of "tight" or "loose coupling", and how does it effect code design?
Have you used a Unit Testing framework? If so, how did it (or unit testing in general) benefit your code, if at all?
[Note: we have decided not to make the candidates write or debug actual code in the interview, with the possible exception of FizzBuzz. But that is a topic for another thread.]
Really? I particularly liked those questions. What I liked about them was that, for the most part, there isn't really any right or wrong answers, per se, but I would be surprised if somebody had been doing development work for a year or two and hadn't encountered them in some form. I don't care about the exact syntax; I'm just interested to hear if they can discuss the concepts thoughtfully.