Showing posts with label argument. Show all posts
Showing posts with label argument. Show all posts

2014-11-13

Level Up - Java: What is Vararg?

I like to remember vararg as "variable-length arguments". You may see them parameterized as "foo(Object... objects)" or "foo(int... ints)" or maybe "main(String... args)". The triple-dot signifies the vararg, and the method that has them uses it as an array.

Example code:

/** Returns input as a comma-separated list. If input if null
  * or empty, then this returns an empty string. */
public static String convertToString(Object... objects) {
    if (objects == null || objects.length == 0) { return ""; }
    StringBuilder sb = new StringBuilder();
    for (Object object : objects) {
        sb.append(object.toString()).append(", ");
    }
   return sb.substring(0, sb.length() - 2).

2013-11-05

Infinity Universe

I can only conclude that the universe has always been. I'll provide the argument from two different perspectives in this post - from the science side and from the religion side.

Science:
The major contender is the Big Bang Theory. If that were the case, then eventually more scientists will start asking what caused the big bang? And, what came before that?
There will always be cyclic thinking that something always came before. Ergo, the universe has always been around in some form [as far as we know/believe].

Religion: (most theism should fit)
The universe is basically defined as everything/totality (sidenote: a universe of multiverse, paradox?). So, whenever there was a deity, there was also a universe. Most religions believe that their deity has always been. Thus, the universe has always been [as far as we know/believe].

I'd be happy to hear more academic dialog about this. Just let me know in the comments.

 - Danial Goodwin -



2013-01-28

Heaven's Advocate

As I'm arguing with my roommate the other day, as we do pretty much every day (in a healthy jokingly manner), I know I like playing Devil's Advocate, but I want to introduce a new term now, Heaven's Advocate.

If you don't see the good in something, then the Heaven's Advocate will find it for you.

 - A Devil's Advocate finds the "bad" points in your argument. A Heaven's Advocate will find the "good" part of your story.
 - When you talk with a Devil's Advocate, you are meant to get defensive. When you talk with a Heaven's Advocate, the same thing can be done.

Have any more ways of describing a person that likes to be Heaven's Advocate? (As not related to religion)
~ Simply Advanced ~


NOTE: You don't have to believe in a religion to use these terms. They just happen to coincide with terms that religious books use, but words evolve.

NOTE2: "Evolve" is another word that doesn't have to refer to Darwinism, which it was originally used (just one time in the book).