« first day (3396 days earlier)      last day (1777 days later) » 
00:00 - 18:0018:00 - 00:00

00:01
Do you guys believe an ORM is a good idea?
@JBis i would say yes
Well i like Repository pattern with ORM for local storage
Ok so i like to expose a Data Model which is usugally generated from some specific Entity
Entity can be pulled from Remote or Local (or both) service depending on the specific use case
I don't really understand that.
Check this out
but this domain layer should be platform agnostic
P.S. I'm not going to use sails. I am going back to the original way I was doing things and I am going to mix and match the best of express, sails, webpack, sass, babel, and a bunch of other tools to create something that works for me.
@JBis probably the best approach
00:10
@IvanMilisavljevic where do you do the db specific stuff?
So in this specific template im using the Room ORM
Does Room ORM have db specific stuff?
so then how is the domain layer agnostic?
well its not 100% platform agnostic
in my defense, that database specific stuff is consisted of abstract implementations and a lot of annotation processing
so it should be quite easy to migrate to support something different
i've shared the project for you to get a gist on a Repository Pattern
00:15
my models have sql in them is that bad?
   // User model (User.js)
   async getEmailConfirmed() {
        const {row} = await conn.singleRow("SELECT email_confirmed FROM users WHERE id = $1", [this.id]);
        return row.email_confirmed;
    }
what is a model exactly?
if you can understand this code
this is better implementation for same stuff
Tim
Tim
yes that is bad
@Mehdi I'm working on it
Golf is a relatively good game for someone who has fucked up knees
And excellent for meeting people with unnecessary amounts of money
forest, forest gump
why is the namespace "forestgump"? lol
thats -my- was internet handle ;D
00:28
I assume it got too disappointing that it was already taken on every site you signed up on...
not really, but it wasn't as professional as i needed it to be
Professionalism is overrated
The ends justify the means
@IvanMilisavljevic wdym?
MVC
@Tim If I use an ORM that sql would be replaced with method calls, is that better?
Tim
Tim
that's not what the M stands for in mvc
00:35
Yeah, JBis
MVC stands for Maybe Viable Codebase
Tim
Tim
no, your user object class should do nothing except represent some data
There needs to be strong separation between Entity and a Data Model
@IvanMilisavljevic ?
in this case
this user.js is a more of a service than a model
actually yeah in pure MVC this is considered a model
So what should I do here?
00:38
Give up
Let the hopelessness flow through you
@RaghavSood I've tried that twice and failed
Use somethign different for a domain side of things
The actual SQL for creating the Users db is stored somewhere else
What is the "domain side"?
Domain side is everything that has to do with handling business specific logic, for example
every query is part of the domain logic
User authentication method for example is considered to be a specific part of the business logic
yeah business logic == domain logic
Ok lets break this down
The User model should do what?
00:42
Try on fast fashion items suggested by college drop outs with hipster haircuts
Pull the data from the db (or 3rd party service) and transform that data into a Data Model
also whats with the naming convention for this gist.github.com/jbis9051/…
The sql is the "pulling the data"
sql is just a single source
also why are those async methods static?
I would generally not put raw SQL in the models
Set up a separate storage layer, that then defines an IsUserConfirmed function, which returns a bool taking in a user_id
Then you only have the SQL in that, and other parts of your code call the function
If your database schema or choices or data sources change in the future, it's a lot easier to update
for the reasons raghav stated above, you should really look into the repository pattern
00:47
@IvanMilisavljevic so I can create a user object from a id, email, etc
or service later pattern
basically any unique value
Separating things like storage away will also make it much easier to implement caching down the road
Since your storage layer can manage the cache and object lifetimes
Without any interaction from the app layer
This applies to other things like network, consuming third party APIs, consuming other microservices you might come up with, etc.
Good abstraction is the difference between $30/hr and $300/hr
@RaghavSood would this be in a User specific sql file
00:49
@JBis i would say yes
something like
Can't speak as to the conventions for nodejs, but generally yes - you'd split it up by some logical method, so have one for user queries, one for posts, one for stats, and so on
UserModel is calling a query from UserDbService
for example
But they'd all be at the same level in their package
So you can still share caching implementations without writing a new cache for each service
@RaghavSood ?
in a same folder :D
00:51
Apologies, I forgot you don't know any legit languages with proper source partitioning systems
Ok
What Ivan said :D
try reading MSDN articles on MVC and Repository patterns
@IvanMilisavljevic Do you not like this pattern?
Not really
it gives me a code smell that you might leak your connections if you make them static
and connection objects are quite heavy
00:54
@IvanMilisavljevic ?
@IvanMilisavljevic That's just JBis, not the code
how do you suggest I do it?
I'm gonna stop making fun of him for the next few hours now
dont make them static
use a dependency injection or a ORM
Create an object and call a methond on that object
@IvanMilisavljevic No respect for your shrimp company?
00:58
@twiz oh you forgot that forestgump was one of investors in early days of apple as well :D
god i love that movie
01:12
@IvanMilisavljevic but it's just quicker to use static methods
statics are evil
It's also quicker to not learn good practices, but it doesn't help you in the long run
@IvanMilisavljevic y
especially when dealing with async, heavy objects
So what would be the method calls to create a user from a email
@IvanMilisavljevic How does overhead of calling in async method differ from static methods and non-static methods
@RaghavSood sorry for not giving you a reaction i'm too focused on being productive ;)
01:22
@JBis you might run in a race condition
but in java using statics with threads is a big no no
Async !== threads
That's a non issue for js
async operation needs to be run on a separate thread?
That's a non issue for js (I'm simplifying for our discussion, it could be an issue but it wont be)
not in js
@IvanMilisavljevic no
Node is single threaded except when its not (aka when you create threads yourself)
> So what would be the method calls to create a user from a email
const user = new User();
user.fromEmail("[email protected]");
?
or overload a constructor
doesn't exist in js
ah
in that case, use a proper language
you can delegate with a single constructor cause function arguments are fake in js
01:27
not that .js garbage
like you can write all your js functions without arguments
||> function bar(){ console.log(arguments[0]) } bar("foo")
@JBis undefined Logged: "foo"
|| magic
01:28
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
Ow, my hand hurts from slamming the table so hard
i felt that
wow jbs you forked yourself
XD
01:30
i guess r15 is the best place on the SO, sicne we have so many younglings
resists making a pedophilia joke
Sounds like we need to bring in Anakin for some spring cleaning
Go do drugs kids, it way more fun than coding :D
Chris Hansen emerges from the shadows
01:32
On a serious note, kudos to both of you
@IvanMilisavljevic Why don't you take a seat right there?
mitms and destroys kudos
They deserve nothing until MVPs are built
raghav leave
|| raghav.reverse()
01:33
Invalid Number of args
raghav.reverse() has been added
all in favor of raghav leaving say yeet
Yes.
|| poll close
New Poll Created: should
Choices: [0] raghav | [1] leave?
A poll is already open for this room. Use || vote [choice] to vote and || vote to see options: should
|| vote 1
01:34
Could not find choice. Choice options are: [0] raghav | [1] leave?
Poll Closed: should
Results: raghav: 0 | leave?: 0
|| poll "should raghav leave?"
New Poll Created: should raghav leave?
Choices: [0] Yes | [1] No
|| vote Yes
Vote recorded..‍.‍.‍.‍.‍.‍.‍
|| vote [0]
01:34
Vote recorded..‍.‍.‍.‍.‍
Try as you may, this is not a democracy
We will overthrow s/o
Have at it, I don't work for SO
You work for us and you are fired
01:35
get out of our office raghav
Go back to making ted talks
these new age kinds have no respect for their elders
It doesn't matter
Ivan do you want to be fired too?
01:37
By the time they're old enough to feel bad about their actions, we will have destroyed the economy and the planet
Ivan can stay, I like him.
You got away with it this time Ivan
01:38
should link to the video imo
i guess you can hear his voice in your head
whoever created it has to change it
|| man noice
noice: "User-taught Command: https://i.ytimg.com/vi/h3uBr0CCm58/hqdefault.jpg" Creator: Ivan Milisavljevic
oh its ivan lol
01:39
lol
this is my fav so far
|| perhaps
lol
@IvanMilisavljevic So should each model have a folder with the model and the database interactions thing?
maybe its better to have a folder (package) with all the models and a separate folders for Services
I would agree
01:42
I agree too
not that i'm an expert
on a quick glimpse
this should be a fine read on the topick
thanks
I wish I had access to the project I was working on at my internship over the summer. I kinda miss working on it
01:46
Are these structures an extension or replacement of the MVC model?
101 what was your project?
models are part of the MVC
(I meant models as in like image models lol)
@JBis I made a server and webapp to manage a network of schlage handkeys. I was just trying to make a more accessible version of the proprietary software. It was pretty involved but I was the only one working on it. I wrote the backend in C# with ASP.net and MongoDB. Front end was in React
cool
I worked on a dating platform that specialized in Suggar Baby/Daddy relations :D
01:50
that sounds wild
it was
but also i worked a lot with specific apps and services for POS terminals
I had the random urge to try and make a dating app near the end of last semester. Like two months ago. I got login and registration working, and a profile creation page but I haven't gone back to it and probably won't lol
@IvanMilisavljevic was the climate awkward or was it very professional?
@Smarticles101 Why? Many exist already.
i made 3 dating applications so far
and none of these made it
idk I just thought it would be fun to make my own
01:55
a did a bunch of weird stuff in my career
im not sure my career has really started yet
Should controllers ever access the service directly?
@Smarticles101 It has.
No, never
Always have something in between them
So then many times the User is gonna have a bunch of static proxy methods
01:58
As raghav said, its going to be easier to change services, add caching and stuff later down the road if you dont expose the service directly
all of those would be proxies
Uh oh. Raghav must be really mad at me.
Yes, but thats fine
>4 lines = gist
@JBis Nah, you're good
02:00
it could be 1 line if you remove all the linebreaks
Your browser windows must be too small
@IvanMilisavljevic is that to me?
alright
|| choose "watch a movie" "do what ivan said"
They are proxies now, but its goiing to be super important in the later stages
02:03
useless, james
you are so useless
im catching up on a mandalorian
|| sudo kill yourself
Try sudo
My life has come to end. I hope to be revived soon.
just make a command for JamesBot to delete it's own code
alright i'm going to watch a movie
adios everyone and thanks ivan
 
3 hours later…
 
4 hours later…
08:31
o/
08:50
:(
09:47
A video on how Raghav learned how to read: youtube.com/watch?v=uqY3FMuMuRo
09:58
LIES
10:15
Truth is upon you Raghav
You can't deny it
You started with a 10Mhz clock
LIES
The 80503 had a 166 MHz clock speed
lmao
10:31
How's your day holding up?
10:52
Well
It started really early
I forgot to buy some medicine last night, but I was too tired to go when I noticed, so I put an alarm at 3 am, went to a drug store, got the medicine, came back, started to read some manga, ate, and now I'm coding
and will probably go to sleep as soon as I finish this one reature
What about yours?
In the two minutes this day has existed, I have acquired coffee
Good, good.
Keeps the machinery up and running.
Indeed
Shit, somehow I managed to invert the logic of this textwatcher
Oh... yeah.
damn
Just invert your whole business idea
And call it a day
11:05
lmao
Fixed it
Now I just have to save it to db
Just write a binary blob to a txt file
Sounds good enough
11:25
I have the best good enough ideas
I figured as much as soon as you acquired coffee
Oh yes, it worked
Time to sleep, I can finish this up later
see ya Raghav
Try not to throw CoffeeOverflowException
11:40
Good night, Mauker.
I am sure you will sleep very well and safely.
starts travel to brazil
11:54
mlem
12:45
No.
13:26
M L E M
 
2 hours later…
15:14
I thought of a solution to the issue I have been having
15:37
Did you give up again?
and un-give up, of course.
So I bought a used iPhone7 on Amazon to use for testing... I'm not sure how optimistic I am about it actually being a functioning device (or a real iPhone). lol
You can usually find cheap newer ones with bad batteries.
Hah well, supposedly going through Amazon they guarantee the battery is decent, so at least I can return it.
Not that the battery needs to be great, but since I'm spending the money on it, I would like to be able use it for some GPS testing, so it needs to at least last a little while.
I almost bought a used one off facebook, but then the guy got pushy telling me I needed to buy it that day. I definitely wasn't trusting that... haha
@JBis You mean the issue of no knowing how to keep your MVC-ish stuff with non-MVC framework?
16:05
@twiz yes
technically its using this framework with a mvc mpa ssr and transpiling
You can use it easily if you remove one of those but i'm not removing one
hmmm... what are you even using the framework for at that point? Just the API?
granted "framework" is one of those words that can mean just about anything.
@RaghavSood ouch... How did it happen?
I tend to think of them as having a fairly broad scope though.
Tim
Tim
Forgot to oil them one time
3
I expected that to go in a much darker direction...
16:10
Express.js is the framework
Ah yea, it's pretty minimal. Or at least used to be. I haven't used it in ages.
its a really great framework but the issue is more with how webpack is designed
webpack + express + a couple other crap is the issue
I'm going to replace webpack
16:28
Anyone here use Jabba?
hah
I hadn't heard of it before, but I've definitely been annoyed by having to deal with the wrong Java version a few times.
hmm actually, instead maybe I should ask if anyone knows anything about uiautomatorviewer. It seems I need to downgrade Java to use it...
I just want to automate clicking a button... lol
17:25
posted on February 02, 2020

Android Weekly #399 🤖 #outlook a{ padding:0; } body{ width:100% !important; margin:0; padding:0; } body *{ -ms-text-size-adjust:none!important; -webkit-text-size-adjust:none!important; } body,.wrapper{ background:#ffffff; color:#505050; font-family:Arial, sans-serif; font-size:12px; } table,table td{ border-collaps

@Feeds damn that pokedex app design is really cool
Those are some extremely pleasant animations.
17:51
fancy stuff
00:00 - 18:0018:00 - 00:00

« first day (3396 days earlier)      last day (1777 days later) »