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
module.exports = controller => {
controller.on('interactive_message_callback', (bot, trigger) => {
trigger.actions.forEach(action => {
if (action.name.match(/^recommend/)) {
var reply = trigger.original_message;
– 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
– 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);
// confusing (a bit), but clear from the return type
user.ban(Period period); // void
user.ban() // return s ban
// solution:
user.currentBan();
---
### V1
@sizovs
sizovs / deps.java
Last active September 27, 2017 13:51
deps.java
class Customer1 {
void change(String password);
}
class Customer2 {
void change(Password password) {
}
}
<p>Hi, Buddy!</p>
<p>Want to learn more about effective software design and architecture in Java?</p>
<p><a href="https://devchampions.com/training/java?_openstat=tb;training;java">Join</a> my upcoming training!</p>
> I.code(); [ code logo ]
> I.coffee(); [ coffee logo ]
> I.DevTernity(); [ devternity logo ]
Requirements:
1) white printify logo on sleeve
2) our stuff front or back
3) maybe logo / text in colour?
4) dark t-shirt, v-neck ideally.
5) the same print will go on coffee mugs.

Awesome Tech Conferences

Awesome DevTernity

Awesome Logo

😎 Curated list of awesome technical conferences.

The goal of this list to promote the best conferences and events.

package net.sizovs.crf.services.core;
import org.hibernate.EmptyInterceptor;
import org.hibernate.type.Type;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer;
import org.springframework.stereotype.Component;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
@sizovs
sizovs / Edvins.js
Last active January 22, 2019 08:24
export const getAuthorName = flickrAuthor => {
const ALL_POSSIBLE_BRACKETS = /[{()}]/g
const VERTICAL_BAR = /^"|"$/g
const [_, name] = flickrAuthor.split(' ');
return name
.replace(ALL_POSSIBLE_BRACKETS, '')
.replace(VERTICAL_BAR, '');