Node is a fine framework, made more palpatable with the recent JavaScript advancements that make it more like a real programming language. Node 8 especially is pretty on point with its support for nearly every modern JS feature including async/await out of the box thus removing the necessity to use something like Babel.
Node.js doesn’t do push notifications from out of the box, though. You wouldn’t want an implementation like that anyhow since it wouldn’t scale and there’d be latency concerns. It would probably be a combination of DynamoDB meets Pusher if you want super real time messaging.
With the advancements of WebSocket API which will be in every major browser soon, something like real time thread updates becomes super doable and easy to do. It’s also probably when I’ll look into integrating something like that because it wouldn’t be any overhead to implement.
User A connects to our WebSocket and joins Thread 123. Thread 123 receives a new post and sends out a notification that a new post was made and the user receives the new post. More than anything, I’d probably queue the messages up and send them over in a batch eg 5 at a time or something.
Node.js doesn’t do push notifications from out of the box, though. You wouldn’t want an implementation like that anyhow since it wouldn’t scale and there’d be latency concerns. It would probably be a combination of DynamoDB meets Pusher if you want super real time messaging.
With the advancements of WebSocket API which will be in every major browser soon, something like real time thread updates becomes super doable and easy to do. It’s also probably when I’ll look into integrating something like that because it wouldn’t be any overhead to implement.
User A connects to our WebSocket and joins Thread 123. Thread 123 receives a new post and sends out a notification that a new post was made and the user receives the new post. More than anything, I’d probably queue the messages up and send them over in a batch eg 5 at a time or something.
To clarify the above, our current framework (Django written in Python) would emit to an intermediary push service when a new post is made (written in Node, perhaps) that our front end client connects to. This backend service would determine where to send the message to and our client would consume based on a handshake.
By Kibner Go To PostDoes anyone know how to get http://example.company.net to resolve to IP 192.1.2.3 using the DNS server and management tools installed on a Windows Server 2012 R2 machine?Incredibly late. But it's actually not that hard to do.
I have googled it and am unable to find clear instructions as I am a completely unexperienced when it comes to configuring a DNS server.
By diehard Go To PostI think it would be cool to make a forum that live-updates replies and new threads, Node.js seems like the perfect back-end solution. Right?
Node.JS is the old Node i think. I think the new one is just called Node. (Think react is similar).
It would appear to be on face value, but Reilo, as above, has more experience with it and the particulars.
By reilo Go To PostTo clarify the above, our current framework (Django written in Python) would emit to an intermediary push service when a new post is made (written in Node, perhaps) that our front end client connects to. This backend service would determine where to send the message to and our client would consume based on a handshake.That would be so cool. There are all sort of auto-refresh plugins but the problem is it resets the page..
I know very little about programming outside of PowerShell and command processors.. and thats just "programming".
By giririsss Go To PostNode.JS is the old Node i think. I think the new one is just called Node. (Think react is similar).At one point there was Node.js, which then split off into Node.js and Io.js that were basically the same thing but the founders were at each others throats. They then merged back into a single framework again that's now Node.js. There was some hub-hub recently where a male engineer was violating all kinds of Code of Conduct that had several members of the foundation leave again because they kept that douche around. It's all kinda complicated, but in short, it's just Node.js
It would appear to be on face value, but Reilo, as above, has more experience with it and the particulars.
By diehard Go To PostThat would be so cool. There are all sort of auto-refresh plugins but the problem is it resets the page..Yea, we want to avoid whole page refreshes and only fetch for data when absolutely necessary, which is why most polling mechanisms are kinda bad because you're making x number of requests every i seconds per n user. WebSockets kind of eliminate that because it makes a retrieval for data when there actually is data, so the user is just kinda chilling on the phone waiting for the representative on the other line to speak again.
I know very little about programming outside of PowerShell and command processors.. and thats just "programming".
I know nothing about PowerShell. Can tell you a bit about Bash and Zsh though.
By giririsss Go To PostHow does the websockets API handle the fact that mobile devices can change IP 5 times in a minute?It doesn't because it doesn't need to? WebSocket is just an open connection from the browser to back-end via an open socket, in the same way that a database stays connected or if you were to make a phone call to someone until you hang up.
I'd have to go back over sockets, but last i understood sockets were effectively just open ports. Unless websockets has built on top of the original sockets stuff from the 2000's.
I like the specification pattern. It lets me easily create dynamic LINQ queries that are readily understandable. I found the basics of it from this codeproject lesson and modified it a bit to let me build a LINQ-to-SQL safe query that executes using a single SQL statement. I really only need to use it when implementing a search feature for data grids.
I basically go through a loop of each search term the user entered and apply it to the appropriate specifications and chain it to the existing specifications from the previous terms to create a single query expression that then executes as a single query on SQL Server.
e: the fuckery i had to go through to learn how to build that expression chain with the specifications, though... lol
e2: if anyone is interested in seeing what it looks like, let me know. it will be easy to throw up on a few links in pastebin
I basically go through a loop of each search term the user entered and apply it to the appropriate specifications and chain it to the existing specifications from the previous terms to create a single query expression that then executes as a single query on SQL Server.
e: the fuckery i had to go through to learn how to build that expression chain with the specifications, though... lol
e2: if anyone is interested in seeing what it looks like, let me know. it will be easy to throw up on a few links in pastebin
By Dark PhaZe Go To PostI'm the last black man standing in my DS courseI always feel so many people get into programming / CS with out any idea of what it really is, and are caught off guard by it.
We started with 6 :(
I'm a dumb-ass weirdo that is enjoying this hunt about how a python setup script is trying to find and use an include directory for another library in its install.
I have the library the script is looking for but it's structure appears to be different than what the script expects. Fun!
I have the library the script is looking for but it's structure appears to be different than what the script expects. Fun!
Well, I had to abandon trying to get some software running on Windows that was built using Linux-only libraries. I would have had to change the source code of at least one library to use Windows equivalents for certain functions and that is way too much work.
Ended up creating a VM and worked through things with that. Still had to manually build a couple things, but at least it was possible without modifying the source. I haven't done much with *nix, so I got to learn a lot about managing multiple different versions of frameworks installed on the same system.
I also ended up learning a lot about compiling from source with make files and such. Didn't really learn a thing about linking, though.
Ended up creating a VM and worked through things with that. Still had to manually build a couple things, but at least it was possible without modifying the source. I haven't done much with *nix, so I got to learn a lot about managing multiple different versions of frameworks installed on the same system.
I also ended up learning a lot about compiling from source with make files and such. Didn't really learn a thing about linking, though.
By Kibner Go To PostWell, I had to abandon trying to get some software running on Windows that was built using Linux-only libraries. I would have had to change the source code of at least one library to use Windows equivalents for certain functions and that is way too much work.Nothing I hate more than platform-specific functions. Some of them are really useful but god...I wish they were never used when developing cross-platform.
Ended up creating a VM and worked through things with that. Still had to manually build a couple things, but at least it was possible without modifying the source. I haven't done much with *nix, so I got to learn a lot about managing multiple different versions of frameworks installed on the same system.
I also ended up learning a lot about compiling from source with make files and such. Didn't really learn a thing about linking, though.
I'm refactoring some of this UI code my co-worker did a couple years ago and his reliance on ViewData in an MVC ASP.Net app is astounding. Also, a pain in the ass to replace.
I just want a clean implementation of our stuff where we can put all our javascript in external files for easy minifying, bundling, resuability, and just plain good design. :(
I just want a clean implementation of our stuff where we can put all our javascript in external files for easy minifying, bundling, resuability, and just plain good design. :(
By reilo Go To PostI hated that shit back when I first learned ASP.net in like 2007 lolIt's a lazy crutch that makes maintenance a pain in the ass.
e: he is also using a UI library in ways that aren't exactly intended so I'm converting that stuff, as well. Should make it easier to identify and fix problems should we need to upgrade to a different version or anything.
By Kibner Go To PostI'm refactoring some of this UI code my co-worker did a couple years ago and his reliance on ViewData in an MVC ASP.Net app is astounding. Also, a pain in the ass to replace.I spend a large part of my time re-writing core code and re-designing it because people never updated their coding styles and standard from 2003 PHP.
I just want a clean implementation of our stuff where we can put all our javascript in external files for easy minifying, bundling, resuability, and just plain good design. :(
By giririsss Go To PostI spend a large part of my time re-writing core code and re-designing it because people never updated their coding styles and standard from 2003 PHP.i'd kill myself
By Kibner Go To Posti'd kill myselfI'm literally the only one driving any standards improvement.
No one had even bothered to look into React for all of the UI's, despite having multiple systems with dashboards handling live transaction updates and such.
I don't know if React is THE solution for that. But it can't be worse than pure html.
By giririsss Go To PostI'm literally the only one driving any standards improvement.welp
No one had even bothered to look into React for all of the UI's, despite having multiple systems with dashboards handling live transaction updates and such.
I don't know if React is THE solution for that. But it can't be worse than pure html.
At least it is making an improvement, and that feels good. I know because I just finished refactoring my co-worker's code for a major feature in most of our projects. No more ViewData everywhere, no more unneeded mapping, view models more in use, reusable templates in place, unnecessary casting done away with, more consistent naming conventions, greater decoupling, more consistent use of our third-party UI framework for a more consistent presentation, the works.
By Suen Go To PostJavascript is one of the worst things I've worked with. I don't like all this magic.What spec are you working with? Early Javascript life is rough... but ES2016 and beyond is like a proper programming language.
Not sure, not familiar with the terminology in the web development world but we're using Typescript and there's enough magic there for me. Fortunately I won't need to sit that much with it. Just give me something that works like C/C++ or Java and I'm happy. C# is okay too but without lots of the unnecessary crap that just makes it complicated. I will never accept shit like partial classes.
Oh, Typescript? That's just a layer to make sure all your variables are typed in JS. It's extremely useful and more of a "make sure your code doesn't break" type of integration. There's also Flow Typed if you want to look into that.
Vanilla JS is pretty boring otherwise.
Vanilla JS is pretty boring otherwise.
Yeah I'm just imagining how much worse it would be if my variables weren't typed so I'm glad we are using Typescript. I've seen Vanilla JS in our code and it just gives me a headache. Some coworkers who work more with the web development were talking about migrating to React but not sure what will happen.
Nothing. React is just a framework to build your website.
I'd really urge you to read into ES2015 and beyond and how the JS script has evolved in recent years. It's fascinating how it moved at such a glacial pace only to become so much more in a relatively short period last couple of years. Node 8 in particular, is quite great, and even has features like async/await (taken from C#) which are a huge boon.
I'd really urge you to read into ES2015 and beyond and how the JS script has evolved in recent years. It's fascinating how it moved at such a glacial pace only to become so much more in a relatively short period last couple of years. Node 8 in particular, is quite great, and even has features like async/await (taken from C#) which are a huge boon.
Yeah feels like I should just get a basic introduction into this really, even if I won't be coding much in it. You never know what happens. What text editor do you use? I'm using VS Code, works pretty fine imo. Does the stuff I need to do.
By Suen Go To PostYeah feels like I should just get a basic introduction into this really, even if I won't be coding much in it. You never know what happens. What text editor do you use? I'm using VS Code, works pretty fine imo. Does the stuff I need to do.vim + tmux and zsh for my command line.
If you're starting in JS, start here: https://nodeschool.io/ If you scroll down there's a "Core" section.
Suen, are you familiar with functional programming? Because that is what javascript uses and it requires a different mindset than the more object oriented and procedural that you are probably used to.
You mean Object Oriented Programming, Kibner?
To clarify, Javascript at its core is a Prototype-based language: https://en.wikipedia.org/wiki/Prototype-based_programming
To clarify, Javascript at its core is a Prototype-based language: https://en.wikipedia.org/wiki/Prototype-based_programming
Not at all. I'm very much used to OO and procedural programming but unfamiliar with functional programming. Tbh I'm kind of against how the academic world (back in my time anyway) teach everything in the context of OOP. I don't think OOP is bad but it's not always the right option either since you should also be putting time into data oriented design/programming if you want to get good perf out of your app.
By reilo Go To PostYou mean Object Oriented Programming, Kibner?Just looked more into that wiki page and the examples. This whole way of using inheritance would mess with my head after a while. It's nice to have the ability to extend something on the spot but I imagine it must be a nightmare to keep an eye on the hierarchy once the inheritance grows
To clarify, Javascript at its core is a Prototype-based language: https://en.wikipedia.org/wiki/Prototype-based_programming
By Dark PhaZe Go To PostI'm the last black man standing in my DS courseI took DS in 2011 and there were 0 other black people in my class.
We started with 6 :(
Ohhh we got a programming thread here. So, last 10 years ive been working as a database developer and qa/systems analyst, but self taught on the job because i came from an art degree and gee turned out i liked database and qa. Was laid off from that 10 yr job 3 months back, and since have been back in school getting dba certs and learning software dev. Learning python for some business intelligence stuff right now and getting started on web dev start to finish type stuff. Also hardcore sql server t-sql/mysql coding and admin. Stuff isnt moving as fast as id like so now im just gonna start learning on my own with the time i have. Watching my life savings deplete though over the coming months is tough. Im alone in a pricey apartment and its heartbreaking really.
This thread could be useful.
This thread could be useful.
Nice! Welcome. I'm currently a full-stack developer at an SF based Enterprise SaaS, but formerly I wore multiple hats including designing and developing at my first job.
Ask questions, share what you are working on, talk about new things you are learning (like how Reilo mentioned currying to me earlier), etc.
We are glad to have you!
We are glad to have you!
Yeah my big thing in the recent months was kind of a confidence issue tbh. I knew i was good at my job, but it was all in the context of a decade job with very specialized things and without much broad industry knowledge outside of that job. So the company shutting down and suddenly being left to myself, not practicing my actual degree but completely 180 into something like this that i enjoy kind of left me thinking i need some formal education. Turns out in half my classes im just a teachers assistant now so im kind of just learning on my own while having the formal school just serve as a certified piece of paper saying i done something. Figure i spin that into my 10 years experience along with glowing recommendation letter from ceo and hopefully i dont become permanently unemployed.
I'm okay at this serverside shit but man does it take a level of "try and fail" that makes me nervous. I'm trying to setup this Let's Encrypt stuff and it's all some sudo required shit which I don't like.
Just PSA if you guys havent watched Halt and Catch Fire (which just ended and i literally just discovered it thanks to a gaf thread), its a legit amazing look into early computers and programming and upstarts. Like, can't believe someone like me that scans for new tv constantly and works in this stuff never knew what it was until it ended. I knew the name but thought it was some political war drama or something. I never heard the term as it relates to programming.
By FreezePeach Go To PostJust PSA if you guys havent watched Halt and Catch Fire (which just ended and i literally just discovered it thanks to a gaf thread), its a legit amazing look into early computers and programming and upstarts. Like, can't believe someone like me that scans for new tv constantly and works in this stuff never knew what it was until it ended. I knew the name but thought it was some political war drama or something. I never heard the term as it relates to programming.Hopefully the last season ends up on Netflix soon so I can binge it.
By jvalioli Go To PostHopefully the last season ends up on Netflix soon so I can binge it.im almost done with season 2 right now. I love it so much.
By reilo Go To PostI'm okay at this serverside shit but man does it take a level of "try and fail" that makes me nervous. I'm trying to setup this Let's Encrypt stuff and it's all some sudo required shit which I don't like.Is there even an easy way to test that shit before rolling out? I guess a subdomain or something?
By Kibner Go To PostIs there even an easy way to test that shit before rolling out? I guess a subdomain or something?i know in company i used to work we had a whole online dev environment. Used PHP though. Just upload files, test things on mobile devices (worked in mobile apps a lot) in a dev environment controlled server side by device ID. Switched it live when we gave thumbs up. EVery place is different, least small companies that is.
By Kibner Go To PostIs there even an easy way to test that shit before rolling out? I guess a subdomain or something?NFI besides hoping it doesn't bring the site down lol
By FreezePeach Go To Posti know in company i used to work we had a whole online dev environment. Used PHP though. Just upload files, test things on mobile devices (worked in mobile apps a lot) in a dev environment controlled server side by device ID. Switched it live when we gave thumbs up. EVery place is different, least small companies that is.Yeah, but SSL is tied to a specific domain, IIRC. Which makes it harder to test. Then again, that is out of my experience so I could be (and probably am) very much wrong.
By Kibner Go To PostYeah, but SSL is tied to a specific domain, IIRC. Which makes it harder to test. Then again, that is out of my experience so I could be (and probably am) very much wrong.nah i don't know much of the technical workings of server-side stuff. When it came to that i was strictly QA performance focused. Don't take my word for it. I just know it never quite seemed an issue to us on mobile android/ios apps.