-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0


CodeSOD: isAlive

Четверг, 07 Апреля 2016 г. 13:30 + в цитатник

Why are we here? What is the purpose of life? What does it even mean to be alive?

No, I havent been hanging out in coffee shops wearing a beret and discussing philosophy. Ive instead been puzzling over this code, from Nikolai K.

    public boolean isAlive() {
        try {
            return true;
        } catch (Exception var2) {
            return false;
        }
    }

    protected void finalize() throws Exception {
        try {
            if(this.isAlive()) {
                ;
            }
        } catch (Exception var2) {
            System.err.println("Error occurred in finalize. Exception: " + var2);
            throw new Exception(var2);
        }
    }

There are some deep philsophical questions here, but I dont think we can hope to extract any answers. This code begs for an explanation, but I cant give you one. I dont think the original author could either. The best Nikolai could give us was that this was in a CORBA wrapper object. Perhaps having to use CORBA drove the original developer mad? Or perhaps the original developer has a wisdom that only the mad can access?

When will isAlive return false?

[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!

http://thedailywtf.com/articles/isalive

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку