This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// confusing (a bit), but clear from the return type | |
user.ban(Period period); // void | |
user.ban() // return s ban | |
// solution: | |
user.currentBan(); | |
--- | |
### V1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
– ShortLinkTest – prefer many small @Tests to a single public test that delegates to private methods. Smaller test immediately give you insight what is failing. Basically, each test case is specification of behaviour: | |
E.g.: | |
public static final String SOME_URL = "https://address.to"; | |
@Test | |
public void acceptsValidPathAndDestination() { | |
ShortLink shortLink = new ShortLink("/path", SOME_URL); | |
assertThat(shortLink.destination()).isEqualTo(SOME_URL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
– Start with interaction. E.g. ask – who is flying on a regular basis? who wants how all this flights work? or better NOT know? : ) | |
- slide #1. Price was high. How high? Let's compare. | |
- reservation systems – what technologies are in use? COBOL? shmobol? | |
– remove acronyms (CRS, GDS, LCA, O&O etc.) to make things more humane | |
– didn't get what is Booking Class. Tell stories! | |
MAJORS: | |
- I have got boarding, but... The major takeaway: media issues price is lower than overbooking??? | |
– you are mentioning numbers, comparing them, sooo fast. Nothing stays in the head. Slow down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = controller => { | |
controller.on('interactive_message_callback', (bot, trigger) => { | |
trigger.actions.forEach(action => { | |
if (action.name.match(/^recommend/)) { | |
var reply = trigger.original_message; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require("request"); | |
module.exports = controller => { | |
controller.on('slash_command', (bot, message) => { | |
if (message.command != "/pic") { | |
return; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require("request"); | |
module.exports = controller => { | |
controller.on('slash_command', (bot, message) => { | |
if (message.command != "/pic") { | |
return; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = controller => { | |
controller.hears(['^say (.*)','^say'], 'direct_mention', (bot, message) => { | |
const thingToSay = message.match[1]; | |
if (thingToSay) { | |
bot.reply(message, thingToSay); | |
} else { | |
bot.reply(message, 'I will repeat whatever you say.') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = controller => { | |
controller.on('user_channel_join', (bot, message) => { | |
bot.reply(message, `Hello, ${message.user}`); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Fix bad naming. | |
class ShoppingCart { | |
UUID getShopingCartId() { ... } | |
boolean checkFreeShippingEligibility() { ... } | |
void removeOrderItem(OrderItem orderItem) { ... } | |
void addOrderItem(OrderItem orderItem) { ... } | |
Collection<OrderItem> getOrderItems() { ... } | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am eduardsi on github. | |
* I am eduardsi (https://keybase.io/eduardsi) on keybase. | |
* I have a public key whose fingerprint is 7C60 9C8E 1779 D373 4859 47C7 6626 82BD 94B2 2363 | |
To claim this, I am signing this object: |