Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 PROGRAMMING


  The most stupid C bug ever

I have been programming for a number of years already. I have seen others introduce bugs, and I have also introduced (and solved!) many bugs while coding. Off-by-one, buffer-overflow, treating pointers as pointees, different behaviors or the same function (this is specially true for cross-platform applications), race conditions, deadlocks, threading issues. I think I have seen quite a few of the typical issues.Yet recently I lost a lot of time to what I would call the most stupid C bug in my career so far, and probably ever.I am porting a Unix-only application which uses tmpfile() to create te...

2,195 0       C BUG STUPID BUG CODE ALL


  Native Client Brings Sandboxed Native Code to Chrome Web Store Apps

Wouldn’t it be great if you could create web apps using your existing C and C++ code? Native Client lets you do just that, and it is now enabled for Chrome Web Store apps in Google Chrome’s beta channel. Native Client apps live on the web platform, so you don’t need to create separate versions of your app for each operating system. Rather than relying on OS-specific APIs, Native Client apps use Pepper, a set of interfaces that provide C and C++ bindings to the capabilities of HTML5. This means that once you’ve ported your code to Native Client, it will work across d...

4,139 1       C++ WEB APPLICATION NATIVE CLIENT USEFUL


  Hail the return of native code and the resurgence of C++

Programming language trends come and go. First, Java is the hot new language, then it's Python, then Ruby steals the limelight, then it's back to JavaScript. But the latest language darling is probably the last one anyone expected. Believe it or not, 2011 could be the year of C++.Last week, the latest version of the ISO C++ Standard was approved by unanimous vote. It's the first major revision of the language in 13 years. Now officially known as C++11, the new standard introduces features designed to make it easier to develop software for modern parallel processing architectures, including lam...

2,634 0       C++ FUTURE RETURN BACK POPULAR LOCAL DEV


  Are You a Good Programmer?

If someone asks you to recommend a good programmer, who comes to mind? Do you consider yourself a good programmer? What criteria do you use to judge?In thinking about this, I realized that there are different ways that a programmer can be good. So I present to you The Four Kinds of Good Programmers. And in celebration of Whyday, I include quirky Why-styled illustrations* for your viewing pleasure!The PhilosopherThe PhilosopherThe philosopher loves to write well-defined, well-structured, beautiful code. That the program will be implemented is assumed; the elegance, robustness, and flexibil...

2,122 0       PROGRAMMER INVENTOR PHILOSOPHER CONQUERO


  How GitHub Works: Creativity is Important

We want to foster a creative environment. We love it when employees hack onside projects. It gets people excited. Excitement is contagious, andspreads easily from one project to another. Even if we’ll never make money onthat side project, the excitement generated from it can bleed into things thatwill make us money.AlcoholIt’s no secret that there’s more than a few people at GitHub who like to drink.I mean, we have four beers on-tap at the office in our kegerator.But alcohol is more important than just intoxication.We meet people. Through our sponsored drinkups, we meet a ...

2,371 0       INNOVATION GITHUB HR CREATIVITY RECRUITM


  How GitHub Works: Be Asynchronous

This is — by far — my favorite aspect of working at GitHub. Everything isasynchronous.ChatGitHub didn’t have an office for the first two years. Chat rooms (in our case,Campfire) is where things got done. Today we’ve moved into oursecond office, and Campfire is still where we get things done. There’s areason for that: chat is asynchronous.Asynchronous communication means I can take a step out for lunch and catch upon transcripts when I get back. Asynchronous communication means I can ask mycoworker a question in-chat and not worry about bothering her since she...

3,068 0       STYLE WORK GITHUB ASYNCHRONOUS EFFICIENC


  How GitHub Works: Hours are Bullshit

Frederick Winslow Taylor wrote the seminal analysis of management andefficiency in 1911 with The Principles of Scientific Management. Hetook the first scientific approach towards maximizing efficiency inmanufacturing jobs. Time is money. Faster is better. More hours are better.Hours are bullshitHours are great ways to determine productivity in many industries, but notours. Working in a startup is a much different experience than working in afactory. You can’t throw more time at a problem and expect it to get solved.Code is a creative endeavor. You need to be in the right mindset to crea...

3,245 0       CODE STYLE WORK TIME EFFICIENCY ENFORCEM


  Modal dialog in Java example code

In Java, we can create modal dialog so that the main JFrame cannot be operated on until the modal dialog is closed. To achieve this, we need to use one class in Java--JDialog. This class can be used to create an modal dialog.Example code :import javax.swing.JDialog;import javax.swing.JLabel;import javax.swing.JPanel;public class Dialog extends JDialog{ public Dialog(){ super(); JPanel panel=new JPanel(); panel.add(new JLabel("Hello dialog")); this.getContentPane().add(panel); } public Dialog(MainFrame mf,String title,boolean modal){ super(mf,title...

40,208 2       JAVA CODE DEMO MODAL JFRAME JDIALOG