Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

01-15-2013 , 11:20 PM
Quote:
Originally Posted by gaming_mouse
yes, i probably would, but sure it depends. if the guy was in front of me and i could tell that he'd done it a million times and it was a just a brain fart or like how people can't remember if the red light is on top or bottom of a stoplight, that would be fine. i still think there would be a very high correlation between failing either of those and not having much experience, and this is coming from someone with a pretty bad memory himself who has to consult docs all the time.
I'm basically with you about the select count(*) (although going forward there'll be a lot more cases of good developers not knowing that) but I'm certainly not with you about the java main method. In my professional career it's pretty rare that I write the main method.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-15-2013 , 11:40 PM
Sara Q Lin builds up the database

Orville R Michelson builds up the middleware

Joe builds on the new abstractions

???
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-15-2013 , 11:43 PM
Quote:
Originally Posted by jjshabado
I'm basically with you about the select count(*) (although going forward there'll be a lot more cases of good developers not knowing that) but I'm certainly not with you about the java main method. In my professional career it's pretty rare that I write the main method.
yeah but coudnt you reason it out, even if you'd forgotten it. it has to be public and static. maybe it's acceptable to forget it's void and say int. as for the arguments, you know it has to be String[] after a seconds thought. anyway ofc it's conceivable an great probrammer just randomly forgets this, but it's not that likely.

basically, the whole reason i started up with this is ST taking issue with Zurvan dismissing people who didn't know count(*). Now, will there be a nonzero rate of false positives (a positive meaning "this guy sucks, next")? yes. will it be very high? no. hence as a quick and dirty method of filtering down say 50+ applicants, i think it's fairly justifiable.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:06 AM
How can FizzBuzz weed out anyone with a CS degree? I am a first year CS student and it took me about 1 minute to code a solution in Java:

Code:
        for (int i = 1; i <= 100; ++i)
        {
            boolean modThree = (i%3 == 0);
            boolean modFive = (i%5 == 0);
            
            if (!modThree && !modFive)
            {
                System.out.print(i);
            }
            
            else
            {
                if (modThree)
                {
                    System.out.print("Fizz");
                }
                if (modFive)
                {
                    System.out.print("Buzz");
                }    
            }
            System.out.println();
        }
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:32 AM
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

Do you need to specify the bangs in Java like that? I think you're missing "fizzbuzz" for mod 15, unless you're printing:

1
2
fizz
4
buzz
6
...
14
fizz
buzz
16
...

Which I'm pretty sure isn't what the question is asking for.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:35 AM
1. you've never met anyone and thought "how the **** did they get in here"? that happens in cs programs too.

2. that looks like it will work Mr. KatoKrazy. how could you make it more concise? also what does ++i mean and why did you use it there?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:35 AM
Here is the output, looks right to me?

Code:
run:
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBuzz
46
47
Fizz
49
Buzz
Fizz
52
53
Fizz
Buzz
56
Fizz
58
59
FizzBuzz
61
62
Fizz
64
Buzz
Fizz
67
68
Fizz
Buzz
71
Fizz
73
74
FizzBuzz
76
77
Fizz
79
Buzz
Fizz
82
83
Fizz
Buzz
86
Fizz
88
89
FizzBuzz
91
92
Fizz
94
Buzz
Fizz
97
98
Fizz
Buzz
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:36 AM
dave,

you're wrong. hint: why does he do that println() at the end?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:38 AM
Quote:
Originally Posted by tyler_cracker
that looks like it will work Mr. KatoKrazy. how could you make it more concise? also what does ++i mean and why did you use it there?
I would have to think a bit to make it more concise, not sure we have learned any easier ways to do it yet.

++i is a pre-increment operator. I used it there because in a for loop, the initial condition is ran first so no need to use a post increment.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:48 AM
thanks for your time, Mr. KatoKrazy. we'll let you know...

Last edited by tyler_cracker; 01-16-2013 at 03:50 AM. Reason: you don't need the nested if blocks
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:50 AM
Quote:
Originally Posted by tyler_cracker
dave,

you're wrong. hint: why does he do that println() at the end?
I was looking at that and this just tells me that I can't read Java at all.

... and thanks for your time! I'll probably hear from you next week..?

Last edited by daveT; 01-16-2013 at 03:53 AM. Reason: oh... I see it now. print() and printlin().
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:58 AM
Wow thanks tyler, I Googled more about pre and post increment operators and learned a lot. It makes more sense to use pre-increment because when using post-increment a copy has to be made, which is completely pointless and less efficient. In the for loop, we are executing the body before incrementing, so it makes sense to use the more efficient way to increment. They certainly don't seem to teach that in class.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 04:03 AM
Quote:
Originally Posted by KatoKrazy
I Googled more about pre and post increment operators and learned a lot. It makes more sense to use pre-increment because when using post-increment a copy has to be made, which is completely pointless and less efficient. In the for loop, we are executing the body before incrementing, so it makes sense to use the more efficient way to increment. They certainly don't seem to teach that in class.


(although really the compiler will probably optimize it for you so it doesn't matter what you write and you should use whatever is most readable.)

Last edited by tyler_cracker; 01-16-2013 at 04:05 AM. Reason: dat nested if tho...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 08:34 AM
The whole exercise is invalid because the name is actually Bizz buzz, not fizz buzz. And it's a game I have played stoned. Thank you.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 09:00 AM
Quote:
Originally Posted by tercet
Cliffs from a jr web developer(4 months on the job) with too much work, who thinks he will get fired
-I ( and 5 other web developers) have too much work
-I've worked 55-65 hours a week for last month trying to make deadlines(Including pretty much non stop during a week long christmas break)
-Cant get extensions on project due thursday, will send out a 75-80% of what a intended website was supposed to be
-Ive been creating 3 new projects while trying to update/make adjustments to multiple sites(last week Ive pretty much had to ignore any updates to work 100% on the new sites)
-I'm partially to blame as I haven't been perfect on the projects

I've never been so anxy/nervous in my life? Shuold I be worried?
I presume your lack of experience makes you miss some perspective. But unless you're extremely well paid and working long hours is tacitly expected from you (even so you shouldn't have to work during a break), your company seems to be very badly managed. If I were you, I would send 2/3 applications a day and take the first job I can get. Odds are you are unlikely to find much worse...

Your job reminded me of my first work experience. Same stress, same hard work, same feeling of guilt. In hindsight I realise I was probably one of the last people to blame but at the time, I didn't know any better.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 11:26 AM
Anyone know some other good forums like this, particular those where it's not just super technical Q&A but a lot of chatter about diff topics.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 01:20 PM
Quote:
Originally Posted by KatoKrazy
Wow thanks tyler, I Googled more about pre and post increment operators and learned a lot. It makes more sense to use pre-increment because when using post-increment a copy has to be made, which is completely pointless and less efficient. In the for loop, we are executing the body before incrementing, so it makes sense to use the more efficient way to increment. They certainly don't seem to teach that in class.
Don't worry about the speed of ordinary language constructs. It never* makes the slightest bit of difference.

You want to write code that is clear to the next poor fool who will be reading it. Optimize that, not speed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 01:28 PM
Quote:
Originally Posted by alex23
Anyone know some other good forums like this, particular those where it's not just super technical Q&A but a lot of chatter about diff topics.
reddit? 4chan?

Quote:
Originally Posted by Chips Ahoy
Don't worry about the speed of ordinary language constructs. It never* makes the slightest bit of difference.

You want to write code that is clear to the next poor fool who will be reading it. Optimize that, not speed.
pony only 9 hours too slow and without donald trump.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 01:45 PM
Quote:
Originally Posted by alex23
Anyone know some other good forums like this, particular those where it's not just super technical Q&A but a lot of chatter about diff topics.
You mean like a 2+2 for programmers? I know there is a demand for it, but who wants to spend their life maintaining it?

@Tyler

4Chan and Reddit are examples of what he's not asking about. I pretty much know who all the people are in this sub-forum and many peoplr throughout this entire forum, thus I can have longer-ranging "chatter" with you guys, but with all the noise on Reddit and anon user names, I may read a good comment but I wouldn't know who it is from, and even if I agree 80% of the time with said poster, if I read a trollish / blatantly wrong commment, I'm more inclined to say something insulting to that person. Since I don't realize I normally like that person, I'm more inclined to call that person a loser / idiot / moron because I don't know that person and I have no sense of community.

My exposure the Reddit and 4chan is minimal, but that's the impression i get.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 01:55 PM
http://hardforum.com/
The hard forum is pretty good. It has a programming sub-forum and the rest of the forums are pretty computer/gadget oriented. I highly recommend this place, not so much for the programming sub-forum but for the entire forum as a whole.

http://forums.digitalpoint.com/
There's the digital point forums but I haven't been there in years. The place seemed like a cess people and I don't think I would recommend it but there's a lot of traffic.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:08 PM
Can someone help me with direct allocating buffers in java, im doing an opengl app for android.

Code:
int[] textureIDs = new int[] { R.drawable.bg, R.drawable.reflect };
		
// create textures

texturesBuffer = IntBuffer.allocate(3*textureIDs.length);
gl.glGenTextures(3, texturesBuffer);
error that i am getting is "(SDK target 3) called a GL11 Pointer method with an indirect Buffer."

My code works on SDK target 3, but if put a higher minSdk it doesnt run.

I tried
Code:
texturesBuffer = ByteBuffer.allocateDirect(3 * textureIDs.length).order(ByteOrder.nativeOrder()).asIntBuffer();
I think i am putting wrong value into allocateDirect, i have no idea which one to put, first time i encounter this unfortunately.

Maybe i should just leave minSdk at 3 and not worry about it...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:26 PM
Quote:
Originally Posted by gaming_mouse
knowing the SQL for number of rows in a table is hardly arbitrary syntax and memorization. there is no possible way a good web developer could fail that test.
Meh can't you ORM around SQL these days? I wrote fizzbuzz in Prolog the other day (as an example of the shortcut if/then/else syntax for my mindmap) and I was wondering if splitting it into fizzbuzz(number) that returns the fizzbuzzstring and a main that calls this and does the writing and then babbling on about functional programming and isolating sideffects would score any bonus points in a job interview.

Most fizzbuzz onlie code I see is just one huge chunk with the prints cluttered in there.

Edit: Also how many points would you mentally substract if the candidate wouldn't automatically write tests for fizzbuzz?

Last edited by clowntable; 01-16-2013 at 03:42 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:33 PM
Quote:
Originally Posted by Urinal Mint
I would like to code Python / use an interpreter using computers at my school. However, they do not have Python or an IDE installed, and as a student I do not have permission to download and install anything.

Is there a way to code in Python and or use a Python interpreter at school using a flash drive? Using another method?
Cloud IDE chrome ap
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 03:34 PM
Quote:
Originally Posted by Urinal Mint
I would like to code Python / use an interpreter using computers at my school. However, they do not have Python or an IDE installed, and as a student I do not have permission to download and install anything.

Is there a way to code in Python and or use a Python interpreter at school using a flash drive? Using another method?
If you have a browser:
http://www.codeskulptor.org/

Note that it's not 100% the same as Python but xlose enough. There's also a free online course based on this (learning Python through game development)
https://www.coursera.org/course/interactivepython

Quote:
Originally Posted by tyler_cracker
urinal mint,

you should also consider the even more useful life skill of making friends with someone in charge of the lab so you can do some stuff "off the books".
Well problems like this is why we learned to haxxor ze gibson, no? At least I got pretty interested in computer security due to similar constraints :P
Def go with Linux on USB/Live-CD.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-16-2013 , 04:05 PM
Quote:
Originally Posted by clowntable
Meh can't you ORM around SQL these days?
If the ORM breaks or doesn't have a feature you need, what do you do then? You can't enter in raw SQL because you don't know it, right?

My only exposure to ORMs and DSLs are Hibernate and Korma respectively. Both have raw query fall-backs just in case. It's one thing if you don't know how to write triggers and views*, but it's an entirely different thing if you don't know how to write and test basic select and update queries.

*I would hope a web developer knows what these things are even if they can't remember the exact syntax to implement them???

I would imagine that an interviewer wouldn't care so much about you writing a test for fizzbuzz. I would imagine he would lead into, "for all numbers that divide by 7, print 'bazz'," then after doing that say "for all numbers that divide by 11, print 'lol'," to see if you catch onto his game and see if you make any changes. This is my imagination speaking, of course.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m