83

I made this a couple of years ago for a joke but no one really got it.

It's a printable smartwatch that always tells the right time, no need for charging...

Comments
  • 9
    The JavaScript code is missing smth.
  • 19
    Java is the only compiled language, that's the main reason why its significantly longer.

    Also, Ruby is ❤
  • 8
    LocalDate date = LocalDate.now();

    DateTimeFormatter format = DateTimeFormatter.ofPattern("h:m:s");

    System.out.print(date.format(format));
  • 3
    MessageBox.Show(DateTime.Now.ToString());
  • 4
    I don't think the js shows anything. 😕
  • 1
  • 3
    @Divisionbyzero yeah. Forgot the console.log();

    I'll fix that with a firmware update...
  • 3
    It's pretty obvious, but I've never used Java.
  • 0
    @theuser It is missing the imports and the class declaration with the public static main method.
  • 1
    Okay, we all get it. Java requires a lot of code for simple tasks. Mate, it's a pretty old joke, stop kicking the dead horse!
  • 0
    @bioDan no. The reason is that it is a verbose language. By design.
  • 0
    @elazar well, thats just another valid reason. But not the "only one"
  • 0
    @bioDan but the reason you mentioned is not valid, since there are compiled, strongly typed, languages that are not nearly as verbose. In fact, most languages are not nearly as verbose :)

    Perhaps what you wanted to point is "manifest typing" - requiring the programmer to declare the type of everything. This, together with the avoidance of global functions and being selective about what is imported automatically.
  • 0
    @elazar i understand what you are saying, and i agree there are less verbose strong typed compiled languages so overall your comment is more precise..

    But when considering the most commonly used programming languages, in the battle of verbosity - interpreted languages vs. compiled languages. Who do you think wins? :) (Generally speaking ofcourse)
  • 0
    @bioDan in general, dynamic languages*. True.

    But this is mainly because they are geared towards small scale development, not large scale. Type inference does not help across module boundaries - it does not scale and does not help readability.

    * (interpretation /compilation are implentation details, not properties of languages. In fact CPython compiles Python to bytecode, pretty much like Java compilers do).
  • 0
    @elazar Many interpreted languages like Ruby and Python are designed for productivity and not for only small scale development, there are many use cases like GitHub.

    Also, these "implementation details" are actually properties of programming languages.
  • 0
    Do you have an uncompressed version for printing?
  • 2
    @StazC I found the old pdf file here http://csrhymes.com/pdf/...
  • 1
    @bioDan Haskell is an (extremely!) strongly typed compiled language, and it's shorter than all others:

    import Data.Time
    getZonedTime

    Or Rust, also strong type system, compiled:

    extern crate chrono;
    fn main() {
    println!("{:?}", Local::now());
    }

    Java is just a special little snowflake.
  • 0
    Sorry, Time.now has deprecated for a long time now. Please use Time.zone.now
Your Job Suck?
Get a Better Job
Add Comment