~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I would say extremely quiet... BTW Dani the link to Daniweb API in your signature is broken.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Apache POI is a pretty well known library for creating .doc and .docx files. If you do a search for "doc to pdf java" you'll come across few open source libraries (not well known) which can do this.

Assuming you are not doing any fancy coloring/formatting, I would recommend writing out documents in a famous format like "markdown" and converting it later to PDF/DOCX.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

There is no authorative site which lists all projects in need of help. One option would be to visit https://github.com/trending?l=java , look at projects which catch your fancy, drop a mail to the owner if he/she is interested in your contributings and fire away.

The "github" way of contributing has the added advantage of training in you in real-life collaboration techniques (the fork-change-pull request model) and getting your feet wet with using "git".

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I switch between projects and I find keeping a note of the current state of things helps. I use the Microsoft OneNote for this but I think any basic text editor should do the job.

As far as working with code is concerned, in case I need to drop off a project and move on to another task, I ensure that I type in junk characters and then close my workspace. This ensures that I get compile time errors when I next open the work area which serves as a reminder of the stuff I was working on. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

One thing is for certain. Daniweb was bleeding users with the old forum based interface

I think this was because the old forum based interface was still very different from the traditional forum based interface offered by many other web sites. The new interface shares the same problem. I had no problems navigating using the old and (now) the new interface but like invisal says, it seems that doesn't apply to a majority of new visitors.

Seems like SO and Reddit also have the same problem; I have seen homework requesters struggle to properly format a post on SO. Even if they do, the post is promptly closed and downvoted to oblivion. But, SO doesn't care because it has an iron grip on a vast majority of users who ask well-framed questions and have an army of professional programmers. Ditto with Reddit.

So to play the devil's advocate, I don't think the design is terrible per-se, it just doesn't seem to be a good fit for the type of crowd we are aiming for...

misi commented: Spot on. +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I have come to realize that only a handful of beginners prefer programming "discussions". This is one of the primary reasons why SO is viral; as long as you have a precise question, there are loads of professionals out there ready to give you an answer for "free". The reward for those professionals is internet "karma" which they can show in their resume (and seems to be working great these days due to the popularity of SO).

I am almost certain that this wasn't the case around 5-6 years back when long discussions on a single thread were a norm because a thread stood for much more than "I need X, how can I do it". Some examples which I can recollect are folks trying to create download managers and entire threads dedicated to solving that "big" problem. Multi-page threads were a norm as opposed to the current trend wherein most threads are solved or die out on a single page.

I'm sure there are still beginners/folks interested in having long discussions, it's just that they no longer use Daniweb but use some more recent solutions like gitter, SO chat and so on. Take an example of learning a new language. Let's say there are few smart newbies out there who would love to learn about Rust programming language. One look at https://www.rust-lang.org/community.html gives you multitude of options to get in touch with other Rust developers. What about Scala? Sure, here you go http://www.scala-lang.org/community/ which again …

overwraith commented: I am thinking your are most right, this is an environmental/changing landscape problem +0
diafol commented: I think you've hit the nail squarely on the head. The question is now, how to keep DW relevant to any type of audience. +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I think it should be fine to have them there to promote other folks to contribute their own solutions/answers.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Also, next takes an optional default argument so you can easily call v0 = next(infile, None) and check the value of v0 before proceeding...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You need to start debugging the code (which is pretty small IMO). As a starting point, what's the smallest sample with which you can reproduce this problem? What happens when you run this with inputs [5, 4]?

Which IDE are you using to write code? Can you try out the "debug" functionality of that IDE to step through your code and check the values at every step? If not using an IDE, can you try inserting some println statements to dump the arraylist values after each step?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The first one fails because base is inside the function which only comes into the picture when the function is executed. When you exec the code string, the top level definitions get executed, the functions themselves don't.

The second one fails because 'int' is not directly present in the ns dict, it's part of ns['__builtins__']['int']. If you really need access to int at the top-most level, you can start off your namespace by something like ns2 = dict( __builtins__.__dict__.iteritems() ).

If you are really trying to write a "intellisense" like thing, your best bet (more like a safer bet) would be to use parsing tools to parse the python code and create meaningful representation out of it (just like all other basic intellisense editors out there :) ). Something like this:

import ast

code='''
def foo():
    def bar():
        pass
    myval = 10
'''
res = ast.parse(code)
res.body[0].name # your top level function name i.e. foo
res.body[0].body[1].targets[0].id # function local variable i.e. myval
res.body[0].body[1].value.n  # function local variable's value i.e. 10

This can get hairy very quick so I'm sure there might be a few open source wrappers lying around for this sort of parsing...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Regarding your 3rd "why", Python performs certain primitive optimizations when it comes to immutable values. For when you write e=258; f=258 on the same line, Python realizes that it can save some space by making both variables point to the same value. This works not only for numbers but all immutable built-in types.

>>> a = 10.1
>>> b = 10.1
>>> a is b
False
>>> a = 10.1; b = 10.1
>>> a is b
True

But realize that this won't happen for mutable types since it results in change of semantics.

>>> a = []; b = []
>>> a is b
False

Again, implementation dependent but good to know I guess. :)

Gribouillis commented: Awesome! +14
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

don't use english by default because usually IT does, use a language you all understand.

I don't really agree with this. Programming cuts across boundaries so always assume that the code you write will end up being maintained by some person on the other side of the globe who doesn't speak the same language as you. English has clearly emerged victorious as a de-facto language for writing programs and communicating with fellow developers (look at any major open-source/closed-source project).

Also, this is a problem because once you get into the habit of naming things in a localized language, you'll find it hard to work at any of the well-known (or maybe Fortune 500 as some call it) companies. After all these years of working as a programmer, I have never seen a developer get away from code reviews after using localized names. :)

Regarding naming, don't clutter your class with single alphabet names but at the same time don't go overboard with naming variables. As long as you keep your functions/methods tightly defined, names don't pose much of a problem (as long someone is half-decent at naming them).

Give extra thought when naming class variables; a mess-up with local variables is still acceptable (because they can be fixed easily) but when you start leaking bad names throughout your code base, stuff goes bad.

I feel the most important thing with programming after all these years is "balance". Should this method be 200 lines long or maybe I can …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I believe it should be fairly easy to figure this one out. When is the NullPointerException thrown? From the stack trace can you locate the line which throws this exception? (InfixToPostfix.<init>(InfixToPostfix.java:22)). What piece of code on that line could possibly be null?

Hint: Java initializes class members to their default value when the class object is created. All references are by default initialized to null.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Two minor points:

  1. You are ignoring the return value of the delete method; this is important if you are absolutely sure you want to have the file deleted since files opened up in other apps block deletion. Also it makes the logging statement incorrect in case the delete fails.
  2. You have a redundant flush/close call. Calling close on the outermost stream will first flush the underlying stream and then close it.
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Don't try to "push" things, it can have a backlash effect. Let's say I have allocated 2 hours for coding, I try to do whatever I can and break out so that I can relax. Even if I don't manage to solve the problem, I leave all the mental baggage behind when I relax and come back to it later.

The point is that you should feel motivated and not forced when trying out the problem again. If you think of it as a 'chore', it would be difficult to get things done. Also instead of staring at the problem, I tend to browse online forums/resources for related issues. There is a very high possibility that reading something random over the internet gives me a hint to solving the problem at hand.

Regarding game making books, Al Sweigart has a couple of free highly-rated books on this website, check them out at https://inventwithpython.com/

00Gambit commented: Thanks +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@00Gambit:

If it helps to motivate you, I was a gaming and anime addict long time back (before I had a programming career). These days I have a full-time programming job. I still haven't given up on games/anime but the addiction is no longer around. I make it a point to spend at least some time helping out other folks on forums, learning new things and so on.

I wouldn't really consider myself a very "strong-willed" individual, so if I can break out of the addiction and set my goals to learn something new every once in a while, I'm pretty sure you can do it too!

00Gambit commented: Thanks +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You have got nothing to be ashamed of. Like mentioned elswhere, it's just your preference. If you have seen my posts on the subject of other Q/A sites, you will know that I am a big fan of the SO concept. It is indeed a revolutionary thing which has happened to the developer community by providing answers to almost all trivial/moderately difficult questions on a single website.

But, I still post to Daniweb because it operates in a completely different manner as opposed to SO. I remember helping a guy long time back solve his problem which spanned around 10 forum pages! This is something which you would absolutely not see in SO; it's a "targeted" Q/A site with no room for subjective opinions/questions. I would say Daniweb has a less "mechanical" feel given that it promotes discussions as opposed to a single correct answer.

The above is of course my personal view of things but to back it up, I have been a prolific contributor to both the sites at different points in time. I have a pretty good rep on SO (13K or so) and a co-admin on this site.

You really need not pick one or the other, just do what you feel comfortable with and enjoy the most. Good luck.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I would like to recommend Ene Uran who has been with Daniweb for a long time now and has contributed to Python/Geek's Lounge forums.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I really don't mind it as long as it's just one size bigger than the actual answer text.

I think the bigger problem is identifying what's the question/who is asking it etc. Daniweb is one of the few forums I have seen that has a lot of "stuff" between the question title and the actual content. Look at any other forums like dreamincode, SO and so on. You have the question title which is immediately followed by a description/actual question. Or in case of some forums it's followed by small buttons or links. In the case of Daniweb, we have the title followed by a lot of free space and then a row of pretty big buttons.

Not to mention the way reputation is shown for OP is different when compared to the actual answers. Wouldn't having a special highlight/border solve the issue?

Just a thought, I'm not exactly claiming that this might be the reason but I wouldn't disagree if someone claims that this forum is unfamiliar, something which is what you should really aim for (familiarity) so that people hopping between forums feel right at home as opposed to confused.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Since you need to start and stop the server, you might actually need two servers -- an admin server and a print server. The admin-server manages the print server and the client only sees the "admin" server which acts on the admin commands and passes on the rest of the commands to the actual print server.

It seems like a weird design to have normal clients have access to "admin" functions on the server. A more logical design will be to have two GUIs -- an admin UI and a usual client UI. The client can queue/un-queue/restart jobs etc. but when it comes to adminnistering the actual server, you use the admin-console/UI which would require admin credentials. The admin UI will be directly hooked to the admin-server (which in turn still controls the print server as mentioned in my previous suggestion). The client UI will directly interact with the print server but will have access to limited actions.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

All,

We have some unfortunate news which was confirmed by Dani and Prit. Our good old friend, Melvin aka Ancient Dragon passed away on Aug 21, 2014. :`(

His obituary can be found here (link courtesy of Prit).

Those who have been here for a long time and those who lurk in the Software Development forums would surely know of his contributions and the impact he made on the community as a whole. He loved gaming and was passionate about programming and helping out others.

RIP Mel, you and your contributions will surely be missed...

.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Although usernames often include multibyte chars, do passwords also share this catholicism? Genuinely curious.

That's a very interesting/good question actually. Since I had a bit of free time, I tried randomly creating accounts on famous websites. I noticed that reddit, facebook and namecheap allow for Japanese passwords (so safe to assume other global languages are also supported). On the flip side, Yahoo and Gmail/google restrict you to ASCII character set.

So to conclude, there are some big corporations who don't support unicode passwords. Also interesting to notice that almost all global social networks allow for unicode passwords. So I would say it really depends on the domain of your application. If there is a need for it, go for unicode passwords but if you can get away with restricting to ASCII, much easy for you. :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Not sure why you are restricting yourself to ASCII by putting in validate calls? Can't PHP deal with unicode chars (e.g. German, Russian passwords)?

diafol commented: good point +15
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

My personal vote would go to WinPython because:

  1. It provides debugging support
  2. Build in linter
  3. Good autocompletion
  4. A complete bundle which includes an IDE (Spyder) and libraries like numpy, scipy and matplotlib
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I'm not sure about the purpose of this exercise but if it is learning more about generics, it would be much better to implement your own wrapper types instead of fighting with the type system. As a simple example:

public class GenericTest {

    public static void main(String[] args) {
        GenericArithmetic<RichInt> gai = new GenericArithmetic<>();
        RichInt addRes = gai.add(RichInt.of(100), RichInt.of(400));
        System.out.printf("Result of adding integers => %s%n", addRes);

        GenericArithmetic<RichDouble> gad = new GenericArithmetic<>();
        RichDouble subRes = gad.subtract(RichDouble.of(100.8), RichDouble.of(50.3));
        System.out.printf("Result of subtracting doubles => %s%n", subRes);
    }

}

interface Numeric<T> {
    T plus(T other);

    T minus(T other);
}

class GenericArithmetic<T extends Numeric<T>> {
    public T add(T first, T second) {
        return first.plus(second);
    }

    public T subtract(T first, T second) {
        return first.minus(second);
    }
}

class RichInt implements Numeric<RichInt> {
    private int i;

    private RichInt(int i) {
        this.i = i;
    }

    public static RichInt of(int i) {
        return new RichInt(i);
    }

    @Override
    public RichInt plus(RichInt other) {
        return RichInt.of(this.i + other.i);
    }

    @Override
    public RichInt minus(RichInt other) {
        return RichInt.of(this.i - other.i);
    }

    @Override
    public String toString() {
        return String.format("%s(%s)", "RichInt", i);
    }
}

class RichDouble implements Numeric<RichDouble> {
    private double d;

    private RichDouble(double d) {
        this.d = d;
    }

    public static RichDouble of(double d) {
        return new RichDouble(d);
    }

    @Override
    public RichDouble plus(RichDouble other) {
        return RichDouble.of(this.d + other.d);
    }

    @Override
    public RichDouble minus(RichDouble other) {
        return RichDouble.of(this.d - other.d);
    }

    @Override
    public String toString() {
        return String.format("%s(%s)", "RichDouble", d);
    }
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sure, but that defeats the purpose of the generic arithmetic class. Let's suppose I create the above GenericsArithmetic class with type parameter as Byte. How would you know which conversion method to use inside the generic add method? My point being, without ugly casts and instanceof checks, it's pretty much impossible to implement a typesafe generic adder without "wrapping" the existing Number type and providing type-safe wrappers.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sorry to say, but the output using Windows 8.1 is not the desired one. All you get is:

Are you running this from the command line or some sort of an IDE? It works fine for me on Windows 8.1

D:\misc>python test.py
counting 0
hello
counting 1
counting 2
counting 3
world
counting 4
counting 5
counting 6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Multiprocessing on Windows does work, but is a bit crippled when compared to multiprocessing on *nix. For e.g., the following code snippet works fine on Windows:

from __future__ import print_function
import time
import functools
import multiprocessing

def runFuncInMp(func, *args, **kwargs):
    p = multiprocessing.Process(target=func, args=args, kwargs=kwargs)
    p.start()

def counter(n):
    """show the count every second"""
    for k in range(n):
        print("counting %d" % k)
        time.sleep(1)

if __name__ == '__main__':
    # start the counter
    runFuncInMp(counter, 7)
    time.sleep(0.9)
    print('hello')   # prints hello, before counter prints 1
    time.sleep(3)
    print('world')   # prints world, before counter prints 4

Notice the removal of the decorator and adding in the if __name__ == '__main__' check.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

As someone who has interviewed for financial organizations and has been involved with setting up an entire team, I really don't care about the degree as long as the candidate has:

  1. The right skillset
  2. Humility
  3. Desire to learn a bit more

As an example, is there any reason to not consider a junior candidate who has a good grasp of the relevant data structures (lists, stack, queues, maps) and algorithm techniques just because he/she doesn't have a CS degree? I personally don't think so.

Though I must say that the unfortunate reality is such that some big companies put a threshold on "who" can apply for their positions due to some arbitrary standards set by the hiring/management committee. Thankfully, this is not a norm and most of the organizations are content with candidates having the relevant experience and skills.

iamthwee commented: true +14
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

In language-agnostic terms, an interfaces determines "what" and the implementers determine "how".

For e.g. if you have an interface Moveable with a method move, it tells you "what" is to expected from something which is a moveable viz. the ability to move. As to "how" that can be done, it depends on "who" is moving.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The biggest point is about consistency. I really don't give a damn what someone uses as long as no one on the team is affected by what they use. For e.g. Eclipse has style/formatting rules which dictate whether you use tabs or spaces, wrap happens at xxx char count, particular style of brace placement etc. If everyone in the team is using Eclipse, it's simple to import these rules but someone working in a non-Eclipse IDE/editor has to do these things manually or write macros and what not.

It would be totally unacceptable for me if someone checks in code in a completely different format just because they were using their favorite text editor. It would also be unacceptable if that person spends 30/60 mins everyday messing around with custom configurations to ensure consistency is maintained because that's 30/60 mins off time the member could have been productive...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

but it only opens the browser--firefox only--for a second, fills out the iframe, and then automatically closes.

I believe this is because the context manager in this case destroys the browser instance the moment it goes out of scope (i.e. as soon as you exit the with block). You can test this out by removing the with block and using your code like:

browser = Browser()
browser.visit(url)
# other stuff
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I would personally use something like Eclipse/IntelliJ because it "just works" out of the box and makes it easy to navigate complicated projects. Sure, you can use your Vim'fu to do all the same stuff I'm not a big fan of carefully tweaking each and every aspect of an "editor" to make it work like an "IDE".

And mind you, this is coming from someone who uses Emacs in Viper mode for his text editing needs...

JeffGrigg commented: Yep! +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Also something which others haven't mentioned; you can't earn rep in any sub-forum which falls under the "Community Center" category.

iConqueror commented: thankyou even though i know this wont up my rep :) cheers +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Just for the clarification of the readers; the output posted using the background decorator is not always guaranteed and depends on how your OS schedules the Python threads. So another possible output can be:

Frank counts 1
Doris counts 1
Frank counts 2
Doris counts 2
Doris counts 3
Frank counts 3
Doris counts 4
Frank counts 4
Doris counts 5
Frank counts 5

(in case you haven't noticed, Doris and Frank changed places after the 2nd count)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

C++ uses pointers and have memory leaks

Just because C++ uses pointers doesn't mean it has to leak memory. It's just that you have to be careful with allocations, sharing and ownership. Modern pointer types like unique_ptr and shared_ptr provide a limited form of garbage collection if used correctly.

In C++ the programmer needs to worry about freeing the allocated memory , where in Java the Garbage Collector (with all its algorithms , I can think of at least 3 algorithms) takes care of the the unneeded / unused variables .

Java still has the problem wherein you can create unncessary garbage which never gets collected. The classic example of this is the naive implmenetation of an array backed linked/array list.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The encoding is UTF-8. Also as already mentioned, use the codecs.open function call to open and read the hindi text file. Something like:

import codecs
with codecs.open('hindi.txt', encoding='utf-8') as f:
    txt = f.read()

>>> txt.count('सूची')
2
>>> parts = txt.split(' ')
>>> len(parts)
48
>>> print(parts)
['इस', 'पृष्ठ', 'पर', 'इन्टरनेट', 'पर', 'उपलब्ध', 'विभिन्न', 'हिन्दी', 'एवं', 'देवनागरी', 'सम्बंधित', 'साधनों', 'की', 'कड़ियों', 'की', 'सूची', 'है।', 'इसमें', 'ऑनलाइन', 'एवं', 'ऑफ़लाइन', 'उपकरण', 'शामिल', 'हैं।', 'इस', 'पृष्ठ', 'पर', 'इन्टरनेट', 'पर', 'उपलब्ध', 'विभिन्न', 'हिन्दी', 'एवं', 'देवनागरी', 'सम्बंधित', 'साधनों', 'की', 'कड़ियों', 'की', 'सूची', 'है।', 'इसमें', 'ऑनलाइन', 'एवं', 'ऑफ़लाइन', 'उपकरण', 'शामिल', 'हैं।\n']
>>> import sys; print(sys.stdout.encoding)
UTF-8

One thing to keep in mind is that the above output is from Ubuntu. Windows sucks in this department by forcing you to use the default encoding cp850 (at least on my Win8) which results in an error when you try to print out the Hindi text.

>>> print(txt)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-1: character maps to <undefined>

The contents of hindi.txt are as follows:

इस पृष्ठ पर इन्टरनेट पर उपलब्ध विभिन्न हिन्दी एवं देवनागरी सम्बंधित साधनों की कड़ियों की सूची है। इसमें ऑनलाइन एवं ऑफ़लाइन उपकरण शामिल हैं। इस पृष्ठ पर इन्टरनेट पर उपलब्ध विभिन्न हिन्दी एवं देवनागरी सम्बंधित साधनों की कड़ियों की सूची है। इसमें ऑनलाइन एवं ऑफ़लाइन उपकरण शामिल हैं।

Also ensure that when you are saving the text …

Gribouillis commented: good help +14
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

While griswolf's advice is spot on, I would like to add few more details to help you out.

Broadly speaking, there are two types of "web services"; RESTful services and SOAP based ones. I would recommend skipping over SOAP services because they are enterprisey, complicated and "not so hot" these days. ;)

A lot of online services these days offer REST API which makes it a perfect choice if you want to play around. Depending on the platform you are on, I would recommend you to install the "requests" module for Python, which makes it dead easy to play with HTTP on the REPL (read-eval-print loop i.e. your Python interactive prompt).

Also give these slides a read (and the ones which appear in suggestions if you have some more time). The simplest example of a REST api in action using requests module is:

import requests
res = requests.get('https://github.com/timeline.json')
status, headers = res.status_code, res.headers
# print them out to view the headers and the HTTP response status code
# Also, inspect the object attributes to find out what more details you can get from the response object
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This GFF library is most probably loading the entire file in memory which is a big "no-no" when dealing with large files. Assuming you are using this library, give that page a read and if the suggestions there don't work, join the GFF forums and ask them a way to stream the file on fly instead of loading it all in memory.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You will have to use a recursive algorithm to compute the size of a folder including all the files and sub-directories (and again all the files in that sub-directory). Use suggestions from this thread for that recursive function. Also, don't use string concatenation for path creation, use os.path.join for that.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The simplest (in terms of effort) solution would be to use the CacheBuilder class provided by Guava (also known as Google collections)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your code won't work because Local is a inner class. You can't create instances of inner classes without an instance of parent/enclosing class. Make Local a nested class (by adding static) to make the error go away.

http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Just a quick note for those concerned about privacy issues after getting featured as "member of the month": you have every right to not disclose your age, the organization you work at etc. As long as the interview turns out to be interesting, everyone is happy.

Of course, if you feel that sharing what you like, dislike and your interests/hobbies is not your cup of tea, I can understand. But if you are just concerned about your identity getting disclosed, don't be; I'm pretty sure Davey can take care of that! :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I would recommend http://www.daniweb.com/members/377908/Gribouillis

He is a moderator but still not featured?!

Also the following good chaps in no particular order because of their good contributions, active participation and helpful nature:

  1. http://www.daniweb.com/members/432133/ddanbe
  2. http://www.daniweb.com/members/838005/Schol-R-LEA
  3. http://www.daniweb.com/members/137377/woooee
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You have 4 loops in your algorithm which means if we do a naive Big-O analysis the time complexity becomes O(n^3)/O(n^4) which doesn't scale well as the input size keeps growing.

Not sure why the algorithm has to be so complicated. How about something like:

  1. Accept user input and generate all permutations
  2. Create a set of dictionary entries
  3. Check if the given permutation is in the set and you are done...

The problem with your code is that it's doing a "linear" search for finding a word which is going to be painfully slow, especially given your algorithm. If you don't want to revise your algorithm (i.e. want to keep using the alphabet to word list mapping), go with a Set instead of a linked list and you should see visible speedup.

A few generic comments:

for(int r=0; r<Scrabbulous.scrab.combos.getSize(); r++){

This will basically recompute the size every iteration, not something you want. Instead use:

for(int r=0, len = Scrabbulous.scrab.combos.getSize(); r < len; r++){

Also, this piece of code:

for(int k=0; k<Scrabbulous.scrab.combos.Head.getWord().length(); k++){
    if(currDictionWordList.getNode(j).getWord().charAt(k) != Scrabbulous.scrab.combos.getNode(r).getWord().charAt(k)){
        isSame = false;
    }
}

is basically re-implementing equals method of the String class.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

In addition, you can run both 32/64 bit Java on 64 bit OS.

The most important property of 64-bit JVM's is that it allows you to have large heaps (4+ GB's) which is not possible with 32-bit JVMs. There are a lot of articles floating around which say that 64 bit apps are faster on 64 bit CPU/OS but at the same time you would find articles saying that running a 32bit JVM on a 64bit OS is much faster.

To conclude, I would rather look at my requirements, do some performance testing and then decide whether the move to 64 bit JVM is justified or not rather than asking strangers on the internet. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

At the bottom of every forum/sub-forum page there is a button which says "Mark Forum Read" (right next to Start New Discussion). That should do the trick.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

why i can't change the thread title?

As already mentioned by Jim, you can only change/edit the thread title/contents within 30 mins of posting it. After that, it's a mod/admin only thing.

One thing to note here is that if you for some reason need the thread title to be changed or the content edited a bit (due to typos etc.), you can always "Flag bad post" the first post of that thread and request the moderator/admin to do it for you. This is assuming your request is is accordance with the rules.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Howdy folks,

Apologies for missing out on the previous season (Summer 2013). Summer wasn't really good enough so it completely slipped through the cracks. But now that Fall 2013 is here and the line-up seems to be pretty awesome (I would say one of the best so far, at least for me), I thought I would post my thoughts.

To start off, the Fall 2013 chart can be found at Neragate. For those who are into ticking/live charts, I have stumbled upon a cool site; here is the link for 2013 fall season. Everything I see on the chart sounds pretty cool so I would definitely be giving all of them a try. But the things which are my "must watch" list are as follows:

  1. Kuroko no Basket 2 (the 2nd season of one of my rated 10 anime)
  2. Magi: The Labyrinth of Magic 2 (2nd season of Magi; an action/fantasy anime. Recommended if you are into fantasy or super-power stuff)
  3. Freezing Vibration (recommended if you like High School DXD, To Love Ru etc.)
  4. IS: Infinite Stratos 2 (the 2nd season of IS; harem/comedy theme)
  5. Strike the Blood (ecchi/action/school/fantasy? What more do I need? :))
  6. Golden Time (Comedy and Romance. I'm in)

Other things which I'll keep my eye on:

  1. Phi Brain: Kami no Puzzle 3rd Season (3rd season; will watch because I have seen the first 2)
  2. Yozakura …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Can any one please let me know why Data loss happing while reading big files?

Because your readLine call actually reads in a line and increments the file pointer. In your current code, you are basically discarding every other line. You need to assign the result of readLine to a variable (as shown above) and print it out for getting expected behaviour.

JeffGrigg commented: Excellent focused and correct answer. +6