Rashakil Fol 978 Super Senior Demiposter Team Colleague

Why do you expect a value between 0 and 1?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

== is the equality comparison operator, not =

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Sadun89, don't listen to the haters.

1.What is Project Xen?

Xen a code project to make better code for make the executable.

2.What for use it?

Programs use it to put the program in your program so that your Xen program programs programs.

3.Is the new trend of multi OSs?

No.

4.Is it the part of Virtualization...?

No.

5.Give me some explanation about it...

If you put a Xen in your Xen it takes your program and program programs the program into program for making programs program their programs just like x86 microarchitecture.

Sadun89 commented: good explanation +3
Rashakil Fol 978 Super Senior Demiposter Team Colleague

The real purpose of classes is to allow for polymorphism using virtual methods. Classes in C++ also provide the mechanism for hiding implementation details.

If polymorphism is not in play, it doesn't matter whether you say player.SitDown(table) or table.OfferSeat(player) or Sit(player, table) . Or something analogous that involves Chairs.

You'll want to make it as difficult as possible to misuse the objects involved and minimize the public interface of each class. This follows the goal of making the code as easy to use as possible. You should consider which decision makes your code easier to write and modify.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

O'Caml is a far better language than Ruby.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Undergraduates do this all the time in their Operating Systems courses. Find some notes online.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

You ask them.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

It's a worst case O(log(n)) operation but you can be pretty sure the expected running time is O(1) (given a heap formed from a uniformly selected permutation of an array).

Rashakil Fol 978 Super Senior Demiposter Team Colleague

The problem with recognizing counter-clockwise or clockwise motion of the mouse pointer is that it takes time to recognize, which means that the UI will lag severely behind the user input. You'll find this to be unacceptable.

To be more specific, you'll need to look at the mouse pointer at a certain time, and then look at the mouse pointer at a later time, and then look at the mouse pointer at a time after that, and see that the direction in which the pointer is moving has changed a not-too-big amount to the left or right. The time between the first and last samples needs to be large enough to represent a real user action, and not just some mouse jiggle. But only _after_ the action is complete will you be able to apply the results of what you just saw.

One way to more realistically simulate clockwise or counter-clockwise turning is to see where the user first presses the mouse button. If he mousedowns to the right of the center of the knob, and drags up, he means to turn the knob counter-clockwise. If he mousedowns to the left of the center of the knob and drags up, he means to turn the knob clockwise. Take the vector from the center of the knob to the mousedown point, rotate it by 90 degrees, normalize it, and call it X. The displacement of the pointer in the direction X indicates how much the knob should be turned …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Taylor notation? Do you have a reference for that?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

geojia you're completely wrong, a function such as 2^(10*n) is not O(2^n). It is O(2^(10*n)) or O(1024^n). Which outgrows an O(2^n) function by (512^n). The ratio between the functions grows exponentially.

That's an exponential difference. It's not a "constant exponential" difference, which doesn't mean anything.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

C or C++ for things that need to be pretty fast,
Python with the NumPy library for things that you would normally use Matlab for,
Fortran for things that really need to run on a supercomputer and run fast, or if you are using libraries written in Fortran,
Haskell or O'Caml for non-numerical computing math problems that are interesting and difficult.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

> I'm currently saying False because if f(n) = 100n and g(n) = n so f(n) is O(n)
then
no constant multiple C * 2^n will produce an upper bound for 2^(100n)

Why do you say no constant multiple C * 2^n will produce an upper bound for 2^(100n)?

So far you haven't done any work, you've merely rewritten the definition of O notation.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I think I'm also in the similar thing,how long will it take one to complete learning the basics of a particular programming language and be proficient.

It depends on how smart you are.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you haven't entered college then you don't really know what career you want, but if you like making software then maybe you should major in CS, or maybe math or computer engineering if you're into that too.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

And one more thing: @ Rashakil Fol
"People make up bureaucratic nonsense like this because the real problems in programming are too deep for them."
Let's hope you're talking about yourself and only yourself. You don't know me, never talk sh(*)t about people you don't know. One advise: change it, or will not find any job.

No, I'm not going to sit by silently as people be wrong on the internet. And gosh, I'm not going to get a job? I'm sooooo scared. I have no problem finding a job, in fact, and I'm sure I'll find one soon if I haven't already.

If you don't care about your coding style, do you really think the weird mind of a programmer will be understood by someone else? Or do you never make mistakes? (which would mean you made nothing at all, everyone makes mistakes). If a programmer with an opinion like that comes at our door for a job, he or she can return home without any talk.

I have a coding style, or several coding styles, depending on the project I'm working on, and (well of course implicitly everybody has a coding style, the question is whether they're aware of it) and the things mentioned in your post here are entirely superficial! You've answered questions about superficial things like naming schemes, and come up with arbitrary answers like using camel-case.

Believe it or not, software errors are generally not caused by how you capitalize and …

ddanbe commented: Nice answer! +9
Rashakil Fol 978 Super Senior Demiposter Team Colleague

it IS a theoretical advantage for 999 out of 1000 users, maybe even 9999 out of 10.000.
Those users NEVER have a need to patch the kernel (or shouldn't have).

Wow jwenting, how'd you ever figure this out?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Microsoft issues kernel patches all the time. Next.

Um, I said you can patch the kernel, not Microsoft. Are you dense?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

.NET and Ruby are the best right now. PHP will never be the best (unless the language and platform undergo a radical revolution) but a future version of Java could catch up to .NET. Ruby has the problem that Ruby library developers are bad at writing correct code, but it's a well-designed language.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Specialization is for insects, and instead of thinking which platform you want to learn facts about, you should be making things. You would have no problem choosing a platform (or simply not caring) if you just did some coding for fun. Salary is a function of how smart you are (and who you trade your labor with), not what platform you use.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Lol, "especially if you include some advanced functions," that's a good one AndreRet.

Just make some awesome code that does something interesting. Write an MP3 player, write a web crawler, write a proxy that merges RSS feeds... write something you find interesting. They just want to see that you don't suck at programming. Are you saying you don't already have a github profile and don't already have lots of itty little projects you've written for that? Shame on you.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Care to elaborate? What more can you do the Linux that you can't do with MS-Windows?

Patch the kernel. That's not a theoretical advantage.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

If you're in the U.S. right now and you can actually code, you can find a job. People aren't unemployed because of outsourcing, they're unemployed because they can't code, or because they're not looking very hard, or because they're choosy.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

ASP.NET is superior to PHP because PHP is a horrible language, but you can use good languages with ASP.NET, and there are Mono implementations, and if they're good then Windows licenses are not a problem. You don't need to worry about "web hosting companies" because why wouldn't you get a VPS? Exactly.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

People make up bureaucratic nonsense like this because the real problems in programming are too deep for them.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

There is no "engineering" anyway unless you work on something like flight control systems.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Some of your complaints are based around the practice of having other global variables that do fancy initialization upon startup. I just avoid these altogether. The initialization of global state is a straightforward process driven by the main function, except for a few standalone hacks. I would want to avoid having a logger with two separate modes of operation. That's more complicated, and more likely to break in non-obvious ways, instead of obvious ones where some variable is null. (Also, if you have to initialize a logger in the main function anyway, we're talking about a more obscure kind of failure if you forget to do that than one which crashes immediately.)

Also, the errors of not initializing a global pointer are obvious. You get a segfault and the stack trace points right at the variable, and it's obvious. This kind of error basically never happens and when it does it's immediately shown on every test and fixed. Your complaints that having a global variable point to a local variable (or a pointer allocated and destroyed in main) is weird are basically irrelevant. It's not weird, we do it all the time. (Well, we do it a couple times, because there aren't that many global variables.) It hasn't led to safety or maintainability problems.

As for the expense of a shared_ptr: it's not small enough for me (or my employer's customers). It of course depends on how much you're copying it, versus how much you're using the map. …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Basically the cabal packaging system, or possibly the Hackage package repository, is crap. You can get around problems by installing the required dependencies directly. For some reason, this works. It is a mystery.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I only claim that this idiom is usually very acceptable, and sometimes necessary in some situations, because initialize-on-first-use is unacceptable in some situations, for performance and correctness reasons. These are reasons for which you need to do something at start-up, and not initialize a variable later. At the same time, you need the variable to be global, because passing it as a parameter to everything is insane.

A.1 and A.2 are claims supported by other parts of your reply so of course I won't address them directly.

As for A.3, that's correct (except the last sentence), and irrelevant, since it's a hypothetical risk that doesn't really happen. Your pre-construction and post-destruction will fail in an obvious manner under testing. (That's assuming it's not horrible and taking different code paths based on the state of the world outside the process.)

B. And some coding practices problems:
1) You require all client code to initialize the global pointer with this "unusual" method (unusual in the sense that it is more than a typical new/delete or smart pointer).

This is a downside if you have multiple main functions, but unavoidable if initialize-on-first-use is intolerable. You can make this very simple by defining a type global_lifetime_holder so that users just need

int main() {
    global_lifetime_holder foo;
    ...
}

This is not onerous. You can set things up so that an error is reported upon termination if the global_lifetime_holder constructor was never called.

2) You require all client code …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Hello mike_2000_17. Would you mind explaining why that's a dirty hack? That's not dirty at all. It's a proper example of the power of RAII, exception-safe and an excellent tool in general. Global variables (and "dynamic variables," which this construct helps implement) have their place in software and it's better to learn how to deal with them properly than to cover your eyes.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Real answer: Use valgrind.

Another plausible answer:

Do something like this:

// your global variable, or a thread local variable when appropriate.
std::map<key, value> *my_var = NULL;

template <class T>
class dynamic_bind {
    T saved_;
    T *var_;
 public:
    dynamic_bind(T *var, const T& value) : saved_(*var), var_(var) {
        *var_ = value;
    }
    ~dynamic_bind() {
        *var_ = saved_;
    }
};

// later...
int main() {
    boost::scoped_ptr m(new std::map<key, value>());
    dynamic_bind b(&my_var, m.get());

    ... body of main function ...

    // Before main returns, b's destructor gets called,
    // setting my_var back to NULL, and then m's destructor
    // gets called, freeing the map.
}
mike_2000_17 commented: -1 for suggesting such a dirty hack... +0
Rashakil Fol 978 Super Senior Demiposter Team Colleague

Stuff about stuff and such, and ...

For comparison, check out Drexel's comp sci and software eng programs for course differences:
Comp Sci - https://www.cs.drexel.edu/files/amn27/BS-CS%20TermbyTerm(09)_1.pdf
Software Eng - https://www.cs.drexel.edu/static/undergraduate/SE_BS_Curriculum_2006.pdf

Note that your decision about which program to go into should be solely based on which courses you think you'll enjoy more.

Also, it should be noted that good software development teams do not have "designers" and "coders" in separate roles. Everybody designs and everybody codes. One does not get good at designing by designing. One gets good at designing by making programs.

I better stop before I go on a long rant about how every "software engineering" program is completely wrong and that any real software engineering program would be structured completely differently.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

More explicitly, an algorithm is a comprehensive, language-independent description of a procedure for solving a problem, in a finite time.
I think that about covers it.

That's one definition. I would argue for these differences:

1. An algorithm does not have to take finite time. For example, it could be something describing an infinite process like "add 1 to each number that comes out of this pipe and put it into that pipe." Or it could be something like, "walk down this infinite tape and flip every bit." Or it could be 10 PRINT "u suck" 20 GOTO 10 , or it could just be a broken, incorrect algorithm.

2. An algorithm does not have to be for solving a problem. For example, you can randomly generate computer programs that describe algorithms, and they'll not be "for solving a problem." They'll just "do stuff." What you say is correct in a certain context, e.g. where problem means some language you wish to recognize, where you're writing an algorithm that can either accept or reject inputs or fail to terminate. This is not really a difference then, but I want to make it clear what it is you are probably saying.

So far, I think difference #1 is non-controversial, and difference #2 is really a pedantic disagreement on terminology. There is a third difference I'd argue, though.

3. Algorithms are not language-independent. Some languages are more powerful than others, either in terms of the set of …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

1. There is no 5th generation of programming languages.
2. Yes.
3. What is super-embedded software?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

No, they are all just fancy words. My job title was once "Software Engineer" and now it's "Systems Engineer" and there's no difference.

Ezzaral commented: Agreed. +14
Rashakil Fol 978 Super Senior Demiposter Team Colleague

15" is just too big for me, for casual carry-around-everywhere use. 14" is of course tolerable, I learned to tolerate that at college, but 13" is really a nice sweet spot. The main depressing downside of the new MacBook pro is that it has a built in CD drive, even on the 13" version, instead of eschewing that and making users carry a separate drive. There's no use of a drive without disks, and if you have disks, a drive's not much bigger. They could surely use that space for something... something power-consumptive, or perhaps just more battery. I can see a 15" machine carrying such a drive, especially if it's a particularly thick workstation model, or if it's swappable with extra battery or better yet an SSD. Which you can do on a MacBook Pro but not in some friendly way.

If I wanted a largeish netbook replacement and was willing to spend the money I'd consider going with a 13" MacBook Air. It lacks the unnecessary stuff, has the essential stuff. Unfortunately right now I'm getting into heavy-duty software development where I'm fighting high compile times and absurd performance demands, and there are better things when the variable in question is portability. On the portable carry-anywhere netbook front, I'm really happy with the Sony Vaio P Series, which is itty-bitty and actually fits in pockets. So if you want to type something out in a cafe, or visit a friend in the city, you don't have to …

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Uh, that's why you should look at the GEdit source code.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Just look at the GEdit source code.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Did you seriously just pee your pants with joy because of a minor upgrade to a computer? For the sake of giving you the benefit of the doubt, we should assume this entire article was sarcastic. Also, how in the world could anybody think that 1200x800 is inferior to 1366x768? Hello? You just said a 16:10 screen with higher vertical pixelage was inferior to a 16:9? And a 1366x768 screen, at that? You just praised the concept of 1366x768! What is wrong with you? (Hint: it's that your standards for screen resolution on a 13" screen are absurdly low. My netbook with an 8" screen has a higher resolution than that.)

Any computer with less than a 1440x900 screen can't really be considered pro, but I'm being too generous -- we might consider that to be amateur, but we should at least give credit to 1600x900 for not being 768 pixels high. It's really a wanna-be 1400x1050, now that's pro, and 1680x1050 and 1920x1080 are naturally pro. If you want a real Pro machine these days you really need something like the Thinkpad T510 or W510 (or W520, coming soon) or HP Elitebook or *gasp* the MacBook Pro 17" edition, with its 1920x1200 resolution. All praise the MacBook 17" Pro! Honestly it's sad that I'm praising a computer with a 16:10 resolution, our standards have fallow so much from the days of 4:3. (Seriously with the 15" they could at least get 1680x1050 and none of this 1440x900 crap.)

happygeek commented: not a mac fan then... -2
Rashakil Fol 978 Super Senior Demiposter Team Colleague

What. Base64 is not a cryptography algorithm.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Gee, why don't you figure this out for yourself?

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Basically anything would be faster.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Uh, write the code in a file? And then load the file.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Looping up to j-2 sure looks dubious.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I'm currently majoring in computer science and taking a class in compiler design. From what I have learned so far, I can tell one thing for certain. Anyone who thinks creating a new programming language is so simple is highly naive and misinformed.

It is simple. You're just failing to take the minimal cut of abstraction.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Take pure science. Social science is basically worthless, you can always learn about geography and history when you're old. Real science is best learned when young.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

Look at their ratio. n^(3/2) / (n log_2 n) simplifies to sqrt(n) / log_2(n).

Use l'Hopital's rule.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

That article is complete nonsense. The terms "software engineer" and "computer programmer" are interchangeable to some people, while others make a distinction and try to categorize people. There is nothing approaching a universal definition.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

I doubt it, but I don't have a convincing proof on hand.

Rashakil Fol 978 Super Senior Demiposter Team Colleague

What griswolf said. Computer science certifications are worthless. (Corollary: Employers for which having a certification is helpful for advancement are also worthless.)

I'm not at the point where I can get an internship yet

I don't believe you. Why do you believe this?