Skip to content

Instantly share code, notes, and snippets.

View sizovs's full-sized avatar
🌴
Mentoring software developers @ principal.dev

Eduards Sizovs sizovs

🌴
Mentoring software developers @ principal.dev
View GitHub Profile
// confusing (a bit), but clear from the return type
user.ban(Period period); // void
user.ban() // return s ban
// solution:
user.currentBan();
---
### V1
– 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);
– 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
module.exports = controller => {
controller.on('interactive_message_callback', (bot, trigger) => {
trigger.actions.forEach(action => {
if (action.name.match(/^recommend/)) {
var reply = trigger.original_message;
const request = require("request");
module.exports = controller => {
controller.on('slash_command', (bot, message) => {
if (message.command != "/pic") {
return;
}
const request = require("request");
module.exports = controller => {
controller.on('slash_command', (bot, message) => {
if (message.command != "/pic") {
return;
}
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.')
}
module.exports = controller => {
controller.on('user_channel_join', (bot, message) => {
bot.reply(message, `Hello, ${message.user}`);
});
}
// 1. Fix bad naming.
class ShoppingCart {
UUID getShopingCartId() { ... }
boolean checkFreeShippingEligibility() { ... }
void removeOrderItem(OrderItem orderItem) { ... }
void addOrderItem(OrderItem orderItem) { ... }
Collection<OrderItem> getOrderItems() { ... }
}
### 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: