we're not kids anymore.
I'd rather be in outer space 🛸

❣ Chile in a Photography ❣
PUT YOUR BEARD IN MY MOUTH
taylor price

Janaina Medeiros
tumblr dot com
Monterey Bay Aquarium
art blog(derogatory)

pixel skylines
will byers stan first human second
No title available

JBB: An Artblog!
🪼

Discoholic 🪩

PR's Tumblrdome
Stranger Things

Kiana Khansmith

祝日 / Permanent Vacation
DEAR READER
seen from Romania

seen from Germany

seen from Malaysia
seen from United States
seen from Suriname

seen from Germany
seen from United States

seen from Malaysia

seen from Singapore
seen from Germany
seen from United States

seen from Malaysia

seen from Malaysia
seen from Indonesia

seen from United States

seen from Malaysia

seen from United States

seen from Malaysia

seen from United States

seen from Malaysia
@paper-back
A memo.
The chat bot which I am implementing has Worker, Adapter and Reaction class to work. Adapters watch Chat or SNS and get all messages. Reactions read all messages got and react a message witch they have to react. Worker is a bridge between Adapters and Reactions.
Worker has a endless “for” iteration to get messages from Adapters. Each “for” iteration runs adapters and get messages from them then passes messages to Reactions.
In this implementation, all adapters’ interval time depends on interval time of “for”. But each Chat and SNS which an adapter access to has different interval time that fits continuous access to them. (For example, no wait interval access fits a stream API not but typical Restful API)
I will replace that Worker calls Adapters in “for” with that each Adapters has “for” and put messages into “channel” shared with Worker on its interval time  then Worker passes messages received from “channel” to Reaction.
In new case, each Adapters have each interval time and Worker disposes “for” to get messages then the chat bot will be more loose coupling.
Stack by the other's stack.
The project I was assigned to is to build a multi platform application that uses WebView. The application work on browsers, iOS and Android. It depends on a wep API for data persistence.
Basic features of the application require only the web API, but a feature that requires the native application API (call it App API here) rose a few month ago. We started to implement the feature a few weeks ago.
My business is to implement bridge like features between the web API and the App API that works on WebView. The implementation requires that the App API works correctly, but the App API engineer has’t make it work today although the deadline of his business is a week ago. So my business gets stack for a week.
I would finish my business in this year, but must not be able to finish it. I am so dull.
A moan.
Regardless of our intension, shit like programmer used innerHTML to render DOMs. What did he think about why we use view-frameworks (like React) ?
It is a bad practice that one uses innerHTML to render DOMs in a view-framework.Â
It makes he write "reinventing the wheel" codes as a result, and in most cases the codes are a buggy. And Inconsistencies between a framework-way and innerHTML have less maintainability .
(Even if he could very marvelous codes, he shouldn't do so. Keep maintainable codes)
That he didn't know how to use the framework shouldn't be blamed, but that he didn't get himself understood the usage should be so.
Webpack and Rails again.
I wrote a entry about running webpack and rails a few days ago, I write about it again.
This time, I use webpack-dev-server for compiling JavaScript and place it into memory, then configure Rails to use it without editing templates.
Configure Rails
A helper tag for assets is like this (on slim-template):
= javascript_include_tag('app')
It renders script-tag for assets path to point "/assets/javascripts/app.js" in default. In this case, it should points "http://localhost:5001/javascripts/app.js" that is a path managed by webpack-dev-server.
"javascript_include_tag" points a assets path that is configured in environments-config-file, so I replaced the path with webpack-dev-server path.
# config/environments/development.rb Rails.application.configure do # snip config.action_controller.asset_host = 'http://localhost:5001' end
So javascript_include_tag becomes to point "http://localhost:5001/javascripts" (but not "http://localhost:5001").
Configure webpack-dev-server
Then I configure webpack-dev-server for that "http://localhost:5001/javascripts/app.js" points a JavaScript (in memory) that is compiled by webpack.
Run webpack-dev-server on port 5001
webpack-dev-server --config ./webpack/dev.config.js --port 5001
Make "javascripts/app.js" points JavaScript that is compiled by webpack.
const jsConfiguration = { entry: "./src/app1.js", output: { publicPath: 'javascripts', filename: "app1.js" }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' } ] } }
We have to use "publicPath" but not "path". "path" is to place built files, so isn't for this case.
End-year party
Yesterday, I went end-year party. We, who are I and fellows in the before last company I belonged to, got together to eat a big blocked beef steak and drink.
We had eaten, drank and talked till midnight.
I was so sick of that In the heat of eating I got contact about the project that i am assigned to, but I absolutely enjoyed the party.
Very easy way to execute webpack and Rails as development server
It is very simple way that you use foreman to execute them.
In package.json:
"scripts": { "watch": "webpack --progress --colors --watch --config ./webpack/dev.config.js", "watch-sass": "node-sass --watch ./sass/common.sass ../../public/css/common.css" },
In Procfile.dev:
web: bundle exec rails server -p 5000 compile: cd lib/es && yarn run watch compile: cd lib/es && yarn run watch-sass
Then:
$ foreman start -f Procfile.dev
Why don't I use sass-loader but directly use node-sass ?
It is too slow that rendering sass by combination of sass-loader, css-loader, style-loader and ExtractTextPlugin.
It is 3 secconds longer than rendering by direct rendering with node-sass.
Why do I have to watch his commit logs to check that he finished his work ?
He is a programmer in the project I join now.Â
He doesn’t inform me that his work is finished, so I have to watch his commit logs to look for new commit comes, then pull and run the code and check that it works.
If he would informs me that his work is finished, what I have to do will be just checking that it works. But he doesn't do so. His work style keeps wasting my time.
In general, I should tell him that he should inform me about his work. But, because he isn’t my collaborator but my collaborator’s collaborator, so I cannot force him do so.
Started
“Started” is the word that I usually use as a commit-message of first commit for “WIP” pull-request.
Now, I start this blog for my writing English to learn it and as just blogging.