Berkeley CSUA MOTD:Entry 40394
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/04/03 [General] UID:1000 Activity:popular
4/3     

2005/11/1-2 [Computer/Theory, Computer/SW/Languages] UID:40394 Activity:high
11/1    Teaser: write an algorithm for finding prime numbers.
        \_ boolean isPrime(int x) { return true; }.  It correctly identifies
           any prime number as being prime.  And boy is it fast.  For
           non-prime number use boolean isPrime(int x) { return false; }
           which works JUST AS FAST!  Note that sometimes users may have
           problems with the package because they use the wrong function
           for a given piece of data.  Morons.
           \_ That doesn't answer the question. Try this instead:
              int findPrime() { return 37;};
        \_ How about an algorithm for getting other people to do your
           homework for you?
        \_ Here's a homework hint: go look up the strict definition of
           "algorithm".
           \_ Al Gore does more of that bizarre swaying thing. I don't think
              he has much rhythm at all.
        \_ Are you new to math or new to programming?
        \_ Are you new to asking homework questions on the motd?
2025/04/03 [General] UID:1000 Activity:popular
4/3     

You may also be interested in these entries...
2012/1/24-3/3 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:54296 Activity:nil
1/24    http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
        Amusing "history" of computer science.
        \_ Where's the mentioning of Al Gore the inventor of AlGorithm?
	...
2011/6/29-7/21 [Computer/SW/Database, Computer/SW] UID:54133 Activity:nil
6/29    "An Israeli algorithm sheds light on the Bible"
        http://www.csua.org/u/tq4 (news.yahoo.com)
        "Software developed by an Israeli team is giving intriguing new hints
        about what researchers believe to be the multiple hands that wrote the
        Bible."
        \_ "Hype developed by an American OnLine News Feed is giving
	...
2010/8/9-19 [Computer/SW/Security] UID:53917 Activity:nil
8/9     I got two files, one is size 522190848 and the other is size
        521648128.  Both sha256 to the same number.  (and sha1 too).
        I don't think this is supposed to happen, right? (least not with
        sha256).
        \_ how are you checking?
           \_ I burned one file to cd, so i mounted /cdrom and
	...
2010/3/7-30 [Computer/SW/Languages] UID:53743 Activity:nil
3/7     My sister is graduating soon with a decree in information management.
        She was orignally CS, but couldn't cut the math, so her GPA sucks.
        However, she has had a couple of internships and did fine.  She did
        desktop support at RockYou and is currently doing web programming
        at UC Santa Cruz, but they can't keep her on after graduation.
        Anyone got any jobs?  She wanted to be a network admin, but right now
	...
2010/1/20-29 [Computer/SW/Languages/Misc, Computer/SW/Security] UID:53649 Activity:nil
1/20    Did Chinese come up with new way of quicksort?
        http://www.nytimes.com/2010/01/20/technology/20cyber.html
        Joe Stewart, a malware specialist with SecureWorks, a computer
        security company based in Atlanta, said he determined the main
        program used in the attack contained a module based on an unusu
        al algorithm from a Chinese technical paper that has been
	...
2009/6/30-7/15 [Computer/SW/Languages/JavaScript] UID:53098 Activity:nil
6/30    Javascript, I love you:
        var b = new Boolean(false);
        b;        // false
        !b;       // ALSO false
        !b == b;  // But this is true!
        !!b == !b // Negate both sides and it's false again. FUCK.
	...
2006/1/23-25 [Computer/SW/Languages/Java] UID:41480 Activity:nil
1/23    I'm trying to make somebody else's code thread-safe and it seems like
        my synchronization blocks are not being respected.  Does anyone know
        a problem with this code?
        class FooPoller {
          protected static Boolean lock = new Boolean(true);
          private static void poll() {
	...
2006/1/17-20 [Computer/SW/Languages/Java, Computer/SW/Compilers] UID:41399 Activity:low
1/17    Java compiler help please.  I have some code like this:
        import com.foocorp.foolibrary;
        class myClass {
          private static final boolean useFooLib=false;
          {
            if(useFooLib)
	...
2004/12/17-20 [Computer/SW/Languages/Misc, Computer/SW/OS/Windows] UID:35349 Activity:kinda low
12/17   Hey ASIC designers. What are some good drawing tools out there
        to do documentation stuff? This is for things like drawing
        waveforms, block diagrams, boolean gates, transistor symbols.
        Something on a non-Windows platform would be preferable.
        \_ Illustrator?
        \_ OmniGraffle on MacOSX
	...
2004/5/22-23 [Computer/SW/Languages/Java] UID:30367 Activity:moderate
5/22    Alright, who actually uses Java's Integer and Boolean instead of
        the primitive types and why would you do such a thing?
        \_ Why?  Because primitive types aren't objects, so if a function
           expects objects as arguments, what else are you going to do?
        \_ Serialization, can't stick them in library containers, what the
           above poster said.
	...
2004/5/11-12 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:30151 Activity:low
5/10    On a 32 bit architecture, if I declare something boolean or byte,
        does it still use 32 bits, or is it possible to have a different
        offset for the alignment to pack it more efficiently? ok thx.
        \_ For boolean, it's all up to your compiler.  For byte, most likely
           it's 8 bits, but it's still up to your compiler.
           \_ I heard that if the alignment isn't 32, either the arch
	...
2004/4/16-17 [Computer/SW/Languages/Functional] UID:13234 Activity:high
4/16    So, here's a question.  I'm learning Python, and it seems to me that it
        includes a lot of the power of Scheme or Lips, with out the wierdness.
        Would Python make a better introduction to CS language than Scheme?
        \_ Dunno, why don't you just ask Ping, he taught a 61A style course
           in python at Cal.  He claims it was good.  I still haven't yet
           found a good dollar Return on Investment for the time I spent
	...
2004/3/29 [Computer/SW/OS/Windows] UID:12898 Activity:nil
3/28    How to connect 2 WinXP machines together to share files? I have
        them connected into a hub, and each has the same workgroup name,
        but they can't see each other. thanks.
        \_ How many times has it been brought up on motd that you don't
           start a question with "How to..."? I say this not because
           I'm trying to be an ass but because I'm embarrassed when I
	...