This one is going to be a short. A friend of mine did spend some time on PoetInside, which now runs on Evenstar and informed me of three cool bugs which I missed unit-testing.

  1. First, that all my apostrophe's were converted to junk characters. The root cause of the issue lies in the character formatting issues. The XML file exported from Blogger is in UTF-8, and while importing I lost the UTF-8 encoding. Thus, all those somehow were messed up. Anyways, the bug is fixed in the codebase and I shall soon be reimporting my blog to make way for the corrections.
  2. This particular bug I am proud to have introduced, as this happens to be a UX (User Experience) bug. In case a post has multiple labels I missed out adding the separating character to the template. Result of waking up late on a Saturday night and that too without intoxication. The good part is that the template can be updated on-th-fly from the admin screen (eeehhh... I have't uploaded the snaps for admin screen yet) and thus, it now stands fixed.
  3. Last but not the least, the bug does not allow a user with permissions to view restricted posts even after signing-in. This seems to be a trickier issue for it works with my account which has been configured the same way, as others. But with some luck..err...bad luck, I am able to reproduce the issue with another account. This one would take some time as the next two days, I would be on a fire drill.
Keep my hands busy with bugs folks! Let's play code!

written by Sandeep Gupta

Wednesday, February 24, 2010 at 10:25 PM

Evenstar | Update 6

with 4 comments

50 days since I started on this journey, I am glad to say that today I can take some rest. Today, Evenstar reaches its first milestone. Yes, Evenstar is now in running session. And to showcase the same, I moved one of my favorite blogs to be powered by Evenstar. But, the final destination is far away. One day of rest, and then I embark further to make Evenstar, a place where dreams come true.

Go ahead and check out my creations running on my creation. PoetInside, my poetry blog, is now powered by Evenstar.

For the interested, the code is available at https://jerry.svn.sourceforge.net/svnroot/jerry/JerryNext/evenstar/. Downloadable deployable WAR coming soon!

I want to pen something special for Evenstar, but I can't resist posting this too, so here are just a couple of them,

Evenstar is a tribute,
tribute to the spirit of you,
I welcome you to Evenstar,
where dreams come true!

And yes, don't forget to login and see the restricted post feature in action. Hurray!!!

written by Sandeep Gupta

Saturday, February 13, 2010 at 8:40 PM

What use writing a blogging system if I can't use it for my own thoughts, right? And with all the more so into blogging, I can't expect to start something new. I will thus have to migrate all my blogs to Evenstar, sooner or later. How to do that blazingly fast? Can't even think of posting each and every post manually - that would be suicidal.

Thus, the only option left is a blog importer. With the option being common in every day's blogging system, it is all the more easy. Thus, I went ahead and coded a blog importer in Evenstar. Yes, you read it right - to start with Evenstar can now import blogs from Blogger. And it is too simple. Get into Blogger, export your blog as an XML. Login to Evenstar, and import the XML. And there you have, all the blogs, labels, and comments right into Evenstar. Nothing more to do.

Hope this would help making Evenstar a better system. I know you guys are awaiting it to be available for deployment, just hang on, a couple of more days! I promise!

As always, Welcome to Evenstar, where dreams come true!

written by Sandeep Gupta

Wednesday, February 10, 2010 at 11:55 PM

For some reason I happened to be searching for a good question bank on C++ questions that may aid one in brushing up concepts just before the call of an interview. My search did lead to some very useful stuff (though a bit stale and old) which I happen to share in now.

The following questions are part of this bank. All credit goes to Marshall Cline from Paradigm Shift, Inc. Somehow the contact information mentioned in the document doesn't work, but when do the concepts change, right?

Download the question bank from here.
Q1: What is C++? What is OOP?
Q2: What are some advantages of C++?
Q3: Who uses C++?
Q4: Does C++ run on machine `X' running operating system `Y'?
Q5: What C++ compilers are available?
Q6: Is there a translator that turns C++ code into C code?
Q7: Are there any C++ standardization efforts underway?
Q8: Where can I ftp a copy of the latest ANSI-C++ draft standard?
Q9: Is C++ backward compatible with ANSI-C?
Q10: What books are available for C++?
Q11: How long does it take to learn C++?

PART03 -- Basics of the paradigm
Q12: What is a class?
Q13: What is an object?
Q14: What is a reference?
Q15: What happens if you assign to a reference?
Q16: How can you reseat a reference to make it refer to a different object?
Q17: When should I use references, and when should I use pointers?
Q18: What are inline fns? What are their advantages? How are they declared?

PART04 -- Constructors and destructors
Q19: What is a constructor? Why would I ever use one?
Q20: What are destructors really for? Why would I ever use them?

PART05 -- Operator overloading
Q21: What is operator overloading?
Q22: What operators can/cannot be overloaded?
Q23: Can I create a `**' operator for `to-the-power-of' operations?

PART06 -- Friends
Q24: What is a `friend'?
Q25: Do `friends' violate encapsulation?
Q26: What are some advantages/disadvantages of using friends?
Q27: What does it mean that `friendship is neither inherited nor transitive'?
Q28: When would I use a member function as opposed to a friend function?

PART07 -- Input/output via and
Q29: How can I provide printing for a `class X'?
Q30: Why should I use instead of the traditional ?
Q31: Printf/scanf weren't broken; why `fix' them with ugly shift operators?

PART08 -- Freestore management
Q32: Does `delete ptr' delete the ptr or the pointed-to-data?
Q33: Can I free() ptrs alloc'd with `new' or `delete' ptrs alloc'd w/ malloc()?
Q34: Why should I use `new' instead of trustworthy old malloc()?
Q35: Why doesn't C++ have a `realloc()' along with `new' and `delete'?
Q36: How do I allocate / unallocate an array of things?
Q37: What if I forget the `[]' when `delete'ing array allocated via `new X[n]'?
Q38: What's the best way to create a `#define macro' for `NULL' in C++?

PART09 -- Debugging and error handling
Q39: How can I handle a constructor that fails?
Q40: How can I compile-out my debugging print statements?

PART10 -- Const correctness
Q41: What is `const correctness'?
Q42: Is `const correctness' a good goal?
Q43: Is `const correctness' tedious?
Q44: Should I try to get things const correct `sooner' or `later'?
Q45: What is a `const member function'?
Q46: What is an `inspector'? What is a `mutator'?
Q47: What is `casting away const in an inspector' and why is it legal?
Q48: But doesn't `cast away const' mean lost optimization opportunities?

PART11 -- Inheritance
Q49: What is inheritance?
Q50: Ok, ok, but what is inheritance?
Q51: How do you express inheritance in C++?
Q52: What is `incremental programming'?
Q53: Should I pointer-cast from a derived class to its base class?
Q54: Derived* --> Base* works ok; why doesn't Derived** --> Base** work?
Q55: Does array-of-Derived is-NOT-a-kind-of array-of-Base mean arrays are bad?
Inheritance -- virtual functions
Q56: What is a `virtual member function'?
Q57: What is dynamic dispatch? Static dispatch?
Q58: Can I override a non-virtual fn?
Q59: Why do I get the warning "Derived::foo(int) hides Base::foo(double)" ?
Inheritance -- conformance
Q60: Can I `revoke' or `hide' public member fns inherited from my base class?
Q61: Is a `Circle' a kind-of an `Ellipse'?
Q62: Are there other options to the `Circle is/isnot kind-of Ellipse' dilemma?
Inheritance -- access rules
Q63: Why can't I access `private' things in a base class from a derived class?
Q64: What's the difference between `public:', `private:', and `protected:'?
Q65: How can I protect subclasses from breaking when I change internal parts?
Inheritance -- constructors and destructors
Q66: Why does base ctor get *base*'s virtual fn instead of the derived version?
Q67: Does a derived class dtor need to explicitly call the base destructor?
Inheritance -- private and protected inheritance
Q68: How do you express `private inheritance'?
Q69: How are `private derivation' and `containment' similar? dissimilar?
Q70: Should I pointer-cast from a `privately' derived class to its base class?
Q71: Should I pointer-cast from a `protected' derived class to its base class?
Q72: What are the access rules with `private' and `protected' inheritance?
Q73: Do most C++ programmers use containment or private inheritance?

PART12 -- Abstraction
Q74: What's the big deal of separating interface from implementation?
Q75: How do I separate interface from implementation in C++ (like Modula-2)?
Q76: What is an ABC (`abstract base class')?
Q77: What is a `pure virtual' member function?
Q78: How can I provide printing for an entire hierarchy rooted at `class X'?
Q79: What is a `virtual destructor'?
Q80: What is a `virtual constructor'?

PART13 -- Style guidelines
Q81: What are some good C++ coding standards?
Q82: Are coding standards necessary? sufficient?
Q83: Should our organization determine coding standards from our C experience?
Q84: Should I declare locals in the middle of a fn or at the top?
Q85: What source-file-name convention is best? `foo.C'? `foo.cc'? `foo.cpp'?
Q86: What header-file-name convention is best? `foo.H'? `foo.hh'? `foo.hpp'?
Q87: Are there any lint-like guidelines for C++?

PART14 -- C++/Smalltalk differences and keys to learning C++
Q88: Why does C++'s FAQ have a section on Smalltalk? Is this Smalltalk-bashing?
Q89: What's the difference between C++ and Smalltalk?
Q90: What is `static typing', and how is it similar/dissimilar to Smalltalk?
Q91: Which is a better fit for C++: `static typing' or `dynamic typing'?
Q92: How can you tell if you have a dynamically typed C++ class library?
Q93: Will `standard C++' include any dynamic typing primitives?
Q94: How do you use inheritance in C++, and is that different from Smalltalk?
Q95: What are the practical consequences of diffs in Smalltalk/C++ inheritance?
Q96: Do you need to learn a `pure' OOPL before you learn C++?
Q97: What is the NIHCL? Where can I get it?

PART15 -- Reference and value semantics
Q98: What is value and/or reference semantics, and which is best in C++?
Q99: What is `virtual data', and how-can / why-would I use it in C++?
Q100: What's the difference between virtual data and dynamic data?
Q101: Should class subobjects be ptrs to freestore allocated objs, or contained?
Q102: What are relative costs of the 3 performance hits of allocated subobjects?
Q103: What is an `inline virtual member fn'? Are they ever actually `inlined'?
Q104: Sounds like I should never use reference semantics, right?
Q105: Does the poor performance of ref semantics mean I should pass-by-value?

PART16 -- Linkage-to/relationship-with C
Q106: How can I call a C function `f()' from C++ code?
Q107: How can I create a C++ function `f()' that is callable by my C code?
Q108: Why's the linker giving errors for C/C++ fns being called from C++/C fns?
Q109: How can I pass an object of a C++ class to/from a C function?
Q110: Can my C function access data in an object of a C++ class?
Q111: Why do I feel like I'm `further from the machine' in C++ as opposed to C?

PART17 -- Pointers to member functions
Q112: What is the type of `ptr-to-member-fn'? Is it diffn't from `ptr-to-fn'?
Q113: How can I ensure `X's objects are only created with new, not on the stack?
Q114: How do I pass a ptr to member fn to a signal handler,X event callback,etc?
Q115: Why am I having trouble taking the address of a C++ function?
Q116: How do I declare an array of pointers to member functions?

PART18 -- Container classes and templates
Q117: How can I insert/access/change elements from a linked list/hashtable/etc?
Q118: What's the idea behind `templates'?
Q119: What's the syntax / semantics for a `function template'?
Q120: What's the syntax / semantics for a `class template'?
Q121: What is a `parameterized type'?
Q122: What is `genericity'?
Q123: How can I fake templates if I don't have a compiler that supports them?

PART19 -- Nuances of particular implementations
Q124: Why don't variable arg lists work for C++ on a Sun SPARCstation?
Q125: GNU C++ (g++) produces big executables for tiny programs; Why?
Q126: Is there a yacc-able C++ grammar?
Q127: What is C++ 1.2? 2.0? 2.1? 3.0?
Q128: How does the lang accepted by cfront 3.0 differ from that accepted by 2.1?
Q129: Why are exceptions going to be implemented after templates? Why not both?
Q130: What was C++ 1.xx, and how is it different from the current C++ language?

PART20 -- Miscellaneous technical and environmental issues
Miscellaneous technical issues:
Q131: Why are classes with static data members getting linker errors?
Q132: What's the difference between the keywords struct and class?
Q133: Why can't I overload a function by its return type?
Q134: What is `persistence'? What is a `persistent object'?
Miscellaneous environmental issues:
Q135: Is there a TeX or LaTeX macro that fixes the spacing on `C++'?
Q136: Where can I access C++2LaTeX, a LaTeX pretty printer for C++ source?
Q137: Where can I access `tgrind', a pretty printer for C++/C/etc source?
Q138: Is there a C++-mode for GNU emacs? If so, where can I get it?
Q139: What is `InterViews'?
Q140: Where can I get OS-specific questions answered (ex:BC++,DOS,Windows,etc)?
Q141: Why does my DOS C++ program says `Sorry: floating point code not linked'?

Hope this helps.

written by Sandeep Gupta

Monday, February 8, 2010 at 7:33 PM