javascript yíngzhàn xiàngliàn

necklace

Wǒ xiěle yīduàn tèshū de dàimǎ. Zhè duàn yuán dàimǎ shì wǒ lǎobǎn yīgè wǎngzhàn de yībùfèn.

Zhè chéngxù shì yòng PHP hé JavaScript xiě de. Wǒ xǐhuān PHP, dàn JavaScript zěnme yě dǒng bùzháo.JavaScript duì wǒ lái shuō, jiù xiàng wǒ ā mā duìyú méi yùn bù lái'ēn de mǐ mǔ yīyàng mòshēng. Dāng wǒ háishì gè háizi de shíhòu, wǒ ā mā jiù qùshìle. Tā shì shàng yī bèi de wánměi dàibiǎo, tā huì jiānchí zhǔ de jī yīdìng yàoshi xiàn zǎi de! Érqiě, tā hái chánzú.

Wúlùn rúhé, wǒ zài chéngshì mǎ de JavaScript bùfèn shàng yǐjīng làngfèile hěnduō shíjiān. Zhè liǎng xīngqí wǒ yīzhí hěn xiǎng mǎi yītiáo tèshū de xiàngliàn. Yúshì wǒ gàosù zìjǐ, rúguǒ wǒ kěyǐ zài rìluò zhīqián wánchéng cǐ xiàng rènwù, wǒ jiù mǎi nà tiáo xiàngliàn, dàn rúguǒ wǒ méi néng wánchéng, wǒ jiù yǒngyuǎn yǒngyuǎn bù huì mǎi nà tiáo xiàngliàn.

Lìng wǒ shìrán de shì, wǒ jiějuéle wèntí, jiějué fāngfǎ hé JavaScript háo wú guānxì, fǎn'ér yǔ PHP nà biān yǒu guānxì de. Yuánlái wèile dáchéng mùbiāo, xūyào jǐ zìjǐ yīdiǎn yālì.

Xiàngliàn màijiā, wǒ lái a! Nǐ juédé nǎ zhǒng yánsè zuì hǎo kàn?


javascript迎战项链


我写了一段特殊的代码。这段源代码是我老板一个网站的一部分。

这程序是用PHP和JavaScript写的。我喜欢PHP,但JavaScript怎么也懂不着。JavaScript对我来说,就像我阿嬷对于霉运布莱恩的米姆一样陌生。当我还是个孩子的时候,我阿嬤就去世了。她是上一辈的完美代表,她会坚持煮的鸡一定要是现宰的!而且,她还缠足。

无论如何,我在程式码的JavaScript部分上已经浪费了很多时间。这两星期我一直很想买一条特殊的项链。于是我告诉自己,如果我可以在日落之前完成此项任务,我就买那条项链,但如果我没能完成,我就永远永远不会买那条项链。

令我释然的是,我解决了问题,解决方法和JavaScript毫无关系,反而与PHP那边有关系的。原来为了达成目标,需要给自己一点压力。

项链卖家,我来啊!你觉得哪种颜色最好看?



javascript vs necklace


So I just finished writing a particular code. The code was a part of a website owned by my boss.

This code was in JavaScript and PHP. While I love PHP, for the life of me I can't understand JavaScript. It is as foreign to me as Bad Luck Brian meme to my paternal grandmother. Who passed away when I was little. She was from an older generation, you know, who insisted on having the chicken she was about to cook be butchered in front of her eyes! Also, she had lotus feet.

Anyhow, many hours was spent comprehending the JavaScript part of the code. Far too many hours. So I told myself I'd buy a necklace I've been drooling over the last two weeks if I could finish the code by sunset, and never to buy it if I failed.

To my relief I found a workaround that had little to do with JavaScript, much on the PHP side. Turns out one needs a little push to achieve his/her goal.

So... necklace seller, here I come! Which color do you think is best?

No comments: