Rashakil Fol 978 Super Senior Demiposter Team Colleague

How slow is it? If it's slow, it's slow because either (1) computing Board[i][j] is slow or because (2) system("clear") is slow or because (3) appending chars to a stringstream is slow.

1 would be the case if you used a bad datastructure for whatever Board is.

2 could be the case.

3 is probably not the problem -- stringstream implementations are generally slow on a lot of systems. They'll acquire a mutex before doing their operation, which means that appending chars is pretty expensive. However, the board is so small that you wouldn't think this to be a problem. There are only about 7500 characters there, so even if each append took 100 ns it would take under a millisecond to build the stringstream.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Koenig & Moo's Accelerated C++ is the standard recommendation for people who already know how to program in a language.

Personally I didn't have the mental capacity to learn C++ until I was 18. Other people could certainly learn it at a younger age.

He could always learn Python. Or Haskell.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Dynamic scoping is just global or thread-local variables with some cheesewiz.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

With what compiler did you get this? I don't think this is necessarily standard-compliant behavior.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You want fast responses and a small filesize.

You can't get fast responses if you can't fit all your records into one hash bucket -- you'll have to read a second one, and so sometimes you'll double your latency. Low latency is basically the most improtant goal.

To make the probability of overflowing a single bucket small, you might try to average one record per bucket. But if then you get an extra-large filesize.

That also actually hurts performance, because probably the buckets are going to be cached in RAM (i mean you'd be crazy not to do so) which means filesize is quite important because you don't want to overflow RAM. (However, you could also cache in a way that collapses small buckets together, which involves some extra in-memory copying when loading and storing buckets from disk, since, when reading/writing from disk, things need to be aligned on 512-byte boundaries. And since your records are exactly 80 bytes long (which is just a ridiculous fake contrived scenaro) doing this is actually easy.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

See the wikipedia page on the topic: https://en.wikipedia.org/wiki/IEEE_754-2008

Basically you have a sign bit, an exponent part, and a mantissa part, and they represent the number

(1-2*sign_bit) * (1.0 + mantissa) * 2^(exponent - K) where K is a constant, exponent is interpreted as an unsigned integer, and mantissa is interpreted as the bits (of a base 2 number) after the decimal point, forming the number 1.abcdefghijklm... where abcdefghijklm... are the bits of the mantissa. And sign_bit is 0 or 1 of course.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Wait, you went completely off of vBulletin??

Whoa.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

TeX is underused so I wouldn't recommend spending your time on it. The output was always disgusting anyway, as if the TeX ran under disgusting settings.

Yes, you are the only one who likes alternating line colors. This means you are a bad person.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Um.

The preview doesn't support ~~~.
Rashakil Fol 978 Super Senior Demiposter Team Colleague
Test
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Looks like you've messed up the code!

Because Daniweb now sucks for pasting code. Good job Daniweb.

decimal_binary :: Float -> Float -> [Int]
decimal_binary d_num factor = if d_num < 0 || d_num > 255
                              then [0]
                              else if (d_num - factor) < 0
                                   then 0 : decimal_binary d_num (factor / 2)
                                   else if (d_num - factor) == 0
                                        then [1]
                                        else 1 : decimal_binary (d_num - factor) (factor / 2)

det a = read(show a)::Float

main = do putStrLn "Enter an integer in the range 0 - 255: "
          d <- getLine
          putStrLn "The binary form of your input is: "
          print (decimal_binary (det d) 128)

Yes, let's MANUALLY INDENT ALL OUR CODE 4 CHARACTERS.

(read (show "4.5") evaluates to read "\"4.5\"".)

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I don't think a career center employee would have any idea what they're doing. To be more precise, every interaction with such a person that I've heard about in threads like this (based on maybe 3 or 4 examples) has revealed such people to be wrong and ignorant. The advice of people actually working in technical fields, regarding what you should do regarding your career in such fields, is apparently much better than that of general career center employees who say things without much personal knowledge of what they're talking about.

ardav's advice is probably much better.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Dolphin simulator.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Just because you're struggling now doesn't mean you will be in the future. I know somebody who was a mediocre programmer for more than his first half of university and now he's the most productive developer I personally know.

It is not like you are some person who's just magically genetically incapable of getting better at programming. You should not simply decide to forget about CS.

Edit: However, it's not like you should be a masochist about life. Do what you want. If you enjoy IT you should go for that.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You could also figure out your problems by reading the Common Lisp hyperspec.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

really? are you saying that based on experience or maybe observations

I know that experience beats certifications but would including certifications actually make your resume worse?

Since I'm still a student I'm a bit curious about this :)

Observations and experience. Of the eight or ten people I've been involved in interviewing, that the development teams I've been on have decided to hire, none have had certifications. None of those who were even close had certifications. (Except, of course, for the certification known as a college degree.)

All the people who had certifications listed did quite atrociously on the interview. Others have reported similar experiences.

If somebody is a fresh 'n eager college student and thought it would be good to have a certification, that wouldn't count against them, they're just stupid. Somebody experienced who thinks it's good to have certifications on their resume? That seems to be a sure sign they come from this parallel hiring universe filled with bad developers.

It's not like we go "oh, this guy has a certification, we're not going to interview him." If we're looking closely at a resume we'll just try to ignore it. It's more like, when you're doing a quick screen of resumes, you look for signs that they're an interesting candidate, and certifications aren't one of them.

Other examples of people with the same opinion:

See http://stevehanov.ca/blog/resume_comic.png

See also Tip #6 at http://steve-yegge.blogspot.com/2007/09/ten-tips-for-slightly-less-awful-resume.html


So.

The …

zeroliken commented: well said +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's not whether you're interested in programming that's important, it's whether you're any good at it.

If you suck at programming, you should change your major. I don't see how IT could possibly be more interesting than programming.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's a complete waste of time. Programming certifications actually hurt candidates on a resume. Instead you should list the programming you've done as a hobby. If you can actually write code, people will want to hire you.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Truecrypt doesn't change the backup equation, just some constants in the equation.

The software itself works fine, as far as I can tell, and it's as convenient as conceivably possible.

If by "cloud services" you're referring to networked drives that live in the cloud, it should be compatible with those, in the worst case you can have a TrueCrypt volume stored in a file (unless it's assuming it could access direct i/o on the storage device).

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Please point out where in the first block of code I posted that the divide by zero exception is being handled by the compiler. There is no test for zero before the divide so the only way an exception can be raised is through the processor exception.

It was your second block of code (obviously) where you put a (malformed?) try catch block around a division operation. Which is an absurd thing to do, because it's impossible for that code to throw an exception.

Please stop trying to backpedal into some sort of interpretation of your post that would be barely correct and completely useless. It's clear you don't know what you're talking about. See:

Notice there is a lot more start-up code. I suspect that this code is setting up for telling the OS that if an exception happens, we want to continue execution at 0000004d and that line 00000028 is where we make a call into the OS.

I can't find any documentation of processor exceptions (and I have to admit I haven't looked very hard) so I can't tell you what is actually going on there, but I suspect that when the processor hits an exception, it looks at a certain memory location then runs the code that they memory location points to. The OS would be required to set up its exception handling code and establish the value at that memory location.

Nope. That's not what happens. Unless you set a compiler flag (on …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

C++ exceptions are different from CPU exceptions and they don't interact. Momeranth's post is basically wrong.

nezachem is linking to an article that talks specifically about Windows structured exceptions, not C++ exceptions or other kinds. (So they're an example of a certain kind of exception mechanism.)

Ultimately the implementation of exceptions depends on the compiler and runtime you use. Microsoft's C++ compiler and GCC use different techniques for implementing exception handling. There are trade-offs between making exceptions fast and making code paths that lack exception flow fast. Your best bet for finding an answer to your question is to look for compiler-specific information and see how each compiler implements them.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

A randomly assigned password I received, and a nonsense syllable.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Uh, the documentation for it is pretty straightforward, the program is really simple. What help do you need?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> linear algebra(fancy way of saying Calc 3)

LOL, linear algebra is not the same thing as "Calc 3".

> and Statistics.

LOL no.

> Doing some internships outside of school; your really going to need advance math.

Nope.

> And yes in the US (at least in N/S Carolina) they do test their employees in Math and ethnics before hiring

Ethnics? No. You mean ethics? Still no.

Math? Generally nope.

Programming? Yes.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you package it right you can make something with no dependencies. You just have to distribute a Python exe with your application.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Java or Python would suffice.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

JVM bytecode is less decompilable than .NET bytecode. Machine code compiled from C++ or C decompiles into gibberish.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What do you know about linked lists? Can you implement a linked list? Do you know what you can do with one?

Surely you understand what polynomials are and how adding them works.

One part of the question is, how would you represent a polynomial using a linked list? The other part is, what's the algorithm that would add two polynomials that are represented thusly?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> Intelligence arises from the random mutation of thoughts (literally, random neurons misfiring randomly). It is this randomness that enables thinking outside the box and creative thought: intelligence.

Oh look, you can invent your own facts!

Please teach us how to do that, too.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That's a pretty bad way to do it.

What is your goal in life? Or more specifically, what is your goal by solving this problem?

You haven't specified your question enough, either. Do you want the algorithm to punish walks that have more grey squares? Which of these are more diagonal?

***.. ***..
...*. ..**.
....* ...**
....* ....*
....* ....*
Rashakil Fol 978 Super Senior Demiposter Team Colleague

So just to summarize: histrungalot's first reply is wrong, pyTony's reply is right, histrungalot is wrong to say that 2^O(n) is invalid notation.

now, my last question is when should I multiply c in the exponent?

What do you mean? Why would you multiply something into an exponent?

is it only if the O(g(n)) is the exponent? like: 2^(2n) = 2^O(n) --> 2^(2n) <= 2^(c*n)

It is correct to say that 2^(2n) is in the set 2^(O(n)), or, informally, 2^(2n) = 2^(O(n)). It is correct to say that there exists some c such that 2n <= c*n, for positive n. Because the function x -> 2^x is monotonically increasing, it follows that 2^(2n) <= 2^(c*n) for some c, if n is positive.

I think it's wrong to write 2^(2n) = O(2^n) --> 2^(2n) <= 2^(c*n) (but I'm not sure).

This question is nonsensical, because 2^(2n) = O(2^n) is false. 2^(2n) is not in the set O(2^n).

Generally speaking, the notation 2^O(n) is worthless. All it tells you is that you have at most _some_ kind of exponential function. 2^O(n) is equivalent to 4^O(n), but O(2^n) is not the same as O(4^n). The only time I've seen it useful to put O notation inside an exponential is when giving the runtime of Furer's algorithm, which, if I remember correctly, is O(n * log(n) * 2^O(log^*(n))). log^* is the iterated logarithm function.

This means that for some constant k that could be arbitrarily large, the complexity might …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Not sucking at programming is the most important thing for your future. Which languages you know is not.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Java compiles only .java source files

This is completely wrong.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Java is slower than .NET in many circumstances because .NET has structs.

More importantly, C# is a better programming language than Java, that's pretty much indisputable.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The list is obviously B.S., no software developer who is worth anything is going to get certs, and you can throw out all software developer resumes that mention certifications without losing any signal. So at least the software development certs in that list are worthless. For other "IT" people, I don't know.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

interesting.

end function

end class PerfectTest

end interesting.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm going to college with a computer science degree in mind, but I ask myself am I ready for the math.

There's also the question of whether you're ready for the programming.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

also, considering the fact that JavaScript can be disabled by the user, JavaScript on it's own can, but isn't necessarily the "go-to-language" to know.

If the user disables Javascript then let the site break. There's no reason not to target the 99.9% of users that aren't self-destructive crackpots.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

1. How important do you consider computer security?

That depends on the situation. For TI-83+ calculators, not important. For normal computer systems it's basically a question of how much personal information is on the system, or what machinery it's hooked up to, or how much money you lose if it goes down.

2. Do you use Anti‐virus/Anti‐spyware software?

No.

3. which operating system do you consider most secure?

Of mainstream OSes, Windows. By the way joehms22's list is nonsense. He uses a definition of "security" that is not what the word actually means. BeOS is the most insecure OS in his list. (He merely listed the OSes in increasing order of popularity. Way to go.)

4. Do you use names, dates, or cities as your password?

No, I pick random passwords.

g.have you been a victim of identity theft? if not do you take extra precautions so you do not?

No. Generally no.

ret801 commented: Thank you! +2
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Or just store a copy of the min element alongside whatever data structure you want and you can then access it in O(1) time.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Java, C++, C#, any of those would be appropriate. With Python you have to deal with the fact that any code you write yourself will be very slow.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Considering how Javascript is used in the browser these days, a web designer who can't program is not going to be able to do anything interesting, and won't get paid very much.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The only reason I could see for using Java over C# is that Microsoft owns C#.

Oracle owns Java.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Uh no, they use "video capture software."

Rashakil Fol 978 Super Senior Demiposter Team Colleague

There does exist this notion of "front-end developer". There is a market for those skills. How much money you could make depends on how good you are and how good you are at getting people to give you money.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Python doesn't teach bad habits.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The GPL constitutes such a deal, or at least lays claim to that.
Effectively any GPL code will be in the public domain, or rather owned by the people owning the GPL (the EFF I think).

First of all nobody "owns" the GPL. The Free Software Foundation wrote it. Or RMS wrote it before creating the FSF. It does not transfer ownership of copyright to anybody. You still own copyright to your source code and you can do whatever you want with it.

(Regarding the question of whether anybody can "own" copyright on a legal document such as a license: that's still an open question, I think -- in the U.S. at least -- and some lawyers find the idea preposterous. On the other hand the FSF has a clause in the default version of the GPL that lets them and only them upgrade the license to a later version. So in some sense you are granting the FSF an unlimited license to use and redistribute your source code. (The FSF abused this privilege only once, as far as I know, to help Wikipedia upgrade its data from one FSF license to another, incompatible license.) I recommend removing the ugrade clause from the GPL. For the record I'm talking about the GPL v2.0. I haven't read v3.0.)

By placing your code under GPL, you give up ownership of it and replace it with "stewardship" (until someone decides to take your code and run with it ("forking") that …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Narue is exactly right. The intrusive nature of the GPL ensures that as soon as you put anything under it, all derived works are under it as well.
AFAIK it's never been tested what size would be considered a derived work (1%, 0.01%?), but you can't simply cut out the GPL headers and call it something else.

Nope. Since you hold the copyright on your own code you can distribute it however you like. (Unless you have signed a contract with somebody such as an exclusive licensing deal which says otherwise, of course.)

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I am very interested in the field of Computer Science. I don't have any degrees or experience in the field, but the field somehow fascinates me. I am very good in math, very analytical, I like numbers, solving logical problems and stuff like that. In school I was very good in algebra, but geometry gave me a heartache :( I see in the pre-requisite classes at colleges and Universities' programs, there are classes such as Calculus I & II w/Analytic Geometry © MAC 2311 & 2312 (or MAC 2281 & MAC 2282). Analytic Geometry sounds interesting, but I was never good in Geometry in grade school...so, I have NOOOO basic knowledge of it whatsoever...will I have problems studying this degree with no PRIOR major knowledge of Geometry? Also, physics I did not like, either and chemistry...but I can take them up at college...Can you, also, please, tell me if there is anything you really had to be good at at grade school to start learning Computer Science? Thanks a lot!!

"Analytic geometry" when part of the title of a calculus course is simply referring to geometry with the use of the Cartesian coordinate system. In other words, the course is about calculus. Aspects relating to "analytic geometry" include the finding of areas of regions on the plane (whose edges are described by functions), the finding of volumes of rotationally symmetric figures (described as a rotation of a function about the x-axis or y-axis), the finding of perimeters or lengths of …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

No, that doesn't eat into the amount.