美文网首页
代码如诗

代码如诗

作者: 浅耰 | 来源:发表于2019-03-14 09:16 被阅读0次

用代码写诗,是一个程序员“装逼”的最高形式。

01 未竟的爱

class love {};

void main()

{

        throw love();

}

02 导入灵魂

# This scirpt should save lifes.

import soul

for days in len(life):

  print “happiness”

03 一见钟情

// Love at first sight

if (me.getDistanceTo(you.position) < 200) {

  me.setFeelings({

        inLove: true,

  });

}

04 双面人

public class TwoFaced {

    public String greet() {

        return "Hi! So great to see you!";

    }

    private String think() {

        return "Fucking bitch.";

    }

}

05 期待搁浅

private Boolean she_smiles_for_me() {

  //heart:

  while(true) {

      System.out.printIn(”beat.”);

      try {

          Thread.sleep(86400000)

      } catch (InterruptedException e) {}

    }

    return true;

}

06 舞动的心

using System;

public class PoemCode

{

  private bool dancing_within()

  {

      Boolean me = true;

      while (dancing_within())

      {

        var iables_of_light = "";

        try { int elligently_to;

        object ify_the_world_apart; }

        catch (Exception s)

        {

            int o_the_broken_parts;

            throw; int o_the_seed_of_life;

        }

        Random ashes_of = new Random();

        float ing_devices;

        short age_of;

        char acter_will_never_let_you = 'b';

      }

      return me;

  }

}

07 那叫生活

package together.

the. sun.

and. the. summer.

that. moon.

and. all. stars.

and. those. cool. crazy. cars.

and. the. sky.

its. amazing.

and. all. my. kids. laughing. waving.

call. it. life.

oh. i. wish.

it. just. werent.

a. lie;

08 日常琐事

import java.util.Date;

public class DailyGrind {

  public static final void main(String[] args) {

      boolean its_time_to_go_home = false;

      boolean away_the_hours = true;

      while (away_the_hours) {

      boolean away_the_hours = true;

      Date now = new Date();

      its_time_to_go_home = now.getHours() > 17

      && now.getMinutes() > 30;

        if (its_time_to_go_home) {

            break;

      }

      try {

            Thread.sleep(60000);

      } catch (InterruptedException e) {

            // ignore

      }

    }

  }

}

代码如诗

其实,Code Poetry代码诗歌在国外已经是一种被学者们认可的诗歌创作形式,并且有程序员都出自己的诗集了。

代码诗歌有两种,一种是代码书写,人可以直接读懂。另一种是代码书写,机器会转化为有趣的声音,图像等。

相关文章

  • 代码如诗

    用代码写诗,是一个程序员“装逼”的最高形式。 01 未竟的爱 class love {}; void main()...

  • 爱编程

    代码如诗 学的不仅是技术,更是梦想 编程就是为了改变世界

  • 2018-08-27 代码如诗

    不同的命运,造就不一样的人,不一样的人,走不一样的路。 我也不知道,我会选择做什么路,只是知道自己现在真的很糟糕。...

  • Python 代码就该是这种味道

    每种语言都有自己的味道,而我最喜欢 Python 家的。代码如诗,你可以顺着人类的思维去写代码,既然选择了 Pyt...

  • 如诗

    如诗的人, 如诗的梦, 只是如诗, 只约如诗。

  • 如诗

    有时候我在想呐。 想做一个很美好的人,如诗一般。 想就着日月星辰把诗意尽情铺蘸在山川,河流,谷地,云水间。 想一半...

  • 如诗

    一段沧海心情的尘封, 回忆清绝如你余音绕梁; 莺歌长吟的倾心一诉, 不绝梦中你的台阁轻唱。 心上倾城的如梦浮生, ...

  • 如诗

    “你在南方的艳阳里大雪纷飞,我在北方的寒夜里,四季如春。” 没有摇滚的热烈奔放,没有蓝调的低沉忧伤,她...

  • 如诗

    捧一份时光 漫步于古老的桥 悄悄沉浸在绿色轻波 是那缕无悔的惊喜 岁月的吻痕 点缀沧海桑田 如诗的记忆 在这雨后的...

  • 如诗

    风景如诗如梦 也如歌 站立其间 心头一片宁静

网友评论

      本文标题:代码如诗

      本文链接:https://www.haomeiwen.com/subject/xavfmqtx.html