« first day (797 days earlier)      last day (3203 days later) » 

1:00 PM
And yeah JavaScript should be used for UI stuff but honestly the server stuff is incredibly expressive and powerful and - the kicker for me - significantly less bulky than C# or Java (or similar).
C++ and C are alright
 
@DanPantry Which is great, and as long as you can get the task done, I don't particularly care how you do it. I would never choose JavaScript for anything outside of front-end UI updates.
 
Here it is in Swift which is probably a better starting point for doing an Objective-C translation. — nhgrif 34 secs ago
 
as a general rule I don't like anything that requires an IDE - or significant, complex, command line scripts - just to run (see msbuild)
 
@Gemtastic Don't get me wrong - some of the libraries use sophisticated stuff and so reading the function definitions can be a challenge. And the Scala elitists be all like "write perfect Scala code, or go back to Java". In reality, though Scala has many advanced features and concepts, you don't have to use them if you don't yet understand them.
 
@EBrown fair enough. We shall agree to disagree. I have definitely seen my fair share of awful javascript code (and written my fair share)
 
1:01 PM
@DanPantry C is awesome, but nowadays you need is less and less.
Just like ASM went down, C is on it's return. Not by lack of power, but by lack of necessity.
 
@Mast I prefer C99 over C++, regardless of spec.
 
I also prefer C to C++
I used to prefer C++, but C 'feels' similar to JavaScript
 
Order of preference: C#, C99, VB.NET, C, all others (including Python)
 
That said I've never finished a program in C so maybe that's my problem
How can you prefer VB.NET at all?
 
@DanPantry Because that's my work environment (not my choice).
 
1:03 PM
Are we talking in terms of technical preference or developer-happy-fun-mode preference?
Ah
 
@DanPantry Technical.
If it were developer-happy-fun-mode then LOLCODE would be at the top.
 
well, yeah, in terms of technical preference: javascript > c# > java
 
Scala, Java, C++, C, any compiled strongly typed language, anything else
 
@Donald.McLean There it is, another sane person who puts the strongly typed langauges at the top.
 
Though JavaScript isn't completely awful.
 
1:04 PM
JavaScript has it's (few, albeit) moments.
 
I really don't understand the hate for it.
Please ELI5?
 
@DanPantry Try writing a work related project in it and we'll talk.
 
@Mast: I'm a full stack javascript developer by trade. It's what I do as a job.
 
@DanPantry It's like PHP, in that the standard is so piss-poor and broken up that it's impossible to do anything good in it without sacrificing a bit of your sanity and moralistic beliefs.
 
Fortunately or unfortunately, there isn't really an alternative for Single Page Web Apps, so I deal with it.
 
1:06 PM
@EBrown That.
 
I'm not sure what you mean by standard
I mean, do you mean the drafts/technical spec?
 
@DanPantry Sorry, specification.
Yeah.
 
Ah, right
 
Sanity? Meh, who needs it.
 
I rarely venture into the specification unless I need to work something out.
 
1:07 PM
Everything can be done in JS. But none of it is pretty or consistent.
 
@Donald.McLean We need as much as we can spare.
 
@Mast I disagree
Following a style guide certainly helps, though
Some browser side javascript is awful
especially the bits that try and maintain backwards compatibility
but I've never had more fun in any other language than writing server-side javascript
 
@Mast That's like saying "Everything can be done in PHP", but should it? It's not a question of can it, it's a question of should it.
 
Well, yeah , if you try implementing CPU bound tasks in JavaScript you're a bit silly
 
The right tool, for the right job.
 
1:08 PM
@EBrown My current employer said something along the lines of 'Hey, this Node.JS thing I heard about, let's build our server in THAT'
 
You don't use JavaScript for backend work for the same reasons you don't use a hammer to cut a board in half.
 
have you actually used nodejs?
 
While having the need for consistent typing and controlling a hardware bus with it.
 
@Mast That
 
Programming language as religion. Many technologies can be used for most jobs, the "right tool" question is more complicated than most because of personnel issues.
 
1:09 PM
saying that nodejs is the 'hammer' to cut a board in half is ludicrious
 
Event driven bus control in which order of execution is very, very important.
 
@DanPantry Yes, and it was a horrible experience. After which, all three of the developers for this company thought "that was a really bad idea, guys."
 
Mind blown.
 
nodejs was quite literally written to be a web server / io server
 
@Donald.McLean Welcome to our holy war.
 
1:10 PM
Whilst I wouldn't try and write things such as complex video processing logic in javascript
Because that would be incredibly dumb
 
If somebody pulls a knife, I'm leaving.
 
I would reach for it first over, say, .NET or Java, when creating a server/microservices framework
And I want to point out by the way I'm not saying javascript is the swiss army knife to solve all problems
But anyone who says JavaScript is 'not for backend work' is seriously not keeping up with the times and/or does not know how to write good JavaScript
In the same way that if I tried to wriet a backend in C I would butcher it horribly. That's not a problem with C, that's a problem with me
 
@DanPantry Node.js (and, likewise jQuery) are very convoluted solutions to various problems.
 
@DanPantry They're moving for asm.js for stuff like that
 
@EBrown jQuery is awful
 
1:12 PM
Who needs Javascript? You can Python your way through everything.
 
@Morwenn GIL says hi (not that JavaScript has a better alternative to JavaScript)
I meant GIL but i'm leaving that typo for hilarity
 
@Morwenn That was my idea.
 
PyPi waves its hand at GIL.
 
You do realize Python's Event Machine and NodeJS are essentially the same thing
 
I have no argument against JavaScript except that everytime I write in it I feel like I have literally list 10-20IQ points.
 
1:13 PM
Never used Python's event machine.
I always used it C style.
 
@Mast pythons event machine -> twisted, sorry
EventMachine is Ruby
(which I have also used, and that I do not like one bit)
 
Ruby is good for few things, but when it's good for them it's really good for them.
 
Yeah, I mean, twitter showed just how good ruby was at backends and how bad nodejs was
 
Ruby is very specialized. Similarly, so is Perl.
I would choose Ruby, Perl or even PHP over Node.js any day.
 
I think the fact someone is preferring PHP over Node means I will never convince them otherwise
so I will rest my case there because I don't think there's anything I can say
 
1:16 PM
That's not to say, never use it. If you're good at Node.js, then use it. Personally, I would never choose it for anything unless a gun was at my head, and even then I would still try to avoid it.
 
Also because my lunch was over an hour ago
 
@Donald.McLean I think the "will I understand them?" will be a fun thing to find out ^_^
 
@Donald.McLean Scala is not a bad language, it has some very nice properties.
The nicest property, of which, is that it's not Java.
But instead can be used as a replacement for Java.
 
The traits seem to be an interestnig concept
 
Which in my opinion is one of the greatest of all traits.
 
1:19 PM
@Gemtastic There's still stuff I don't understand. So I just don't use that stuff. But the rest - all the advantages of Java, and fewer of the disadvantages.
TRAITS!!!!!!!
 
@Donald.McLean I like trying to learn complex things ^^
 
@Donald.McLean Tell me it doesn't mandate Groovy.
 
So it sounds like a fun challenge
 
Monking
 
@EBrown Huh?
 
@Malachi Monking
 
Also, happy Friday everyone.
 
@EBrown Even Scala has some code that looks like that every now and then. Tuples.
 
@Donald.McLean That's disappointing...
 
@EBrown ah, the dreaded 'magic happens here' code
 
1:24 PM
@EBrown There are some limitations of the JVM that it's hard to work around. But when I say "now and then" - it's rare enough that it doesn't bother me.
 
> [Unix] The canonical comment describing something magic or too complicated to bother explaining properly. From an infamous comment in the context-switching code of the V6 Unix kernel. Dennis Ritchie has explained this in detail.
 
@DanPantry The "Guys, you know we can overload methods, right?" "What do you mean, 'overload'?" "Here, watch this." type deals?
@Donald.McLean As long as it's few and far between. I've seen far too much Java source code that looks similar to that.
 
@EBrown I just find it funny that single file is larger than the entire of the front end for the CRM we are developing in Angular. 700KB christ alive.
And you just know some poor intern wrote that and it wasnt machine generated. It's almost like the real life computer science version of bart simpson writing on the blackboard
 
@DanPantry Ah, Angular.js is another story, of things I don't hate about JavaScript.
 
Too much evil like that exists @DanPantry
 
1:26 PM
@DanPantry The best part is the comment at the top that tries to justify it.
 
@EBrown :-) Angular 2.0 is much, much nicer
 
@EBrown I've never written code like that. AFAIK it's buried somewhere in the heart of the standard Scala library.
 
@DanPantry I'm not a fan of Node, but Angular is actually a decent system.
@Donald.McLean Well you have to wonder how many people thought, "do we really need 250 overloads?" "Guys, you just never know."
 
Anyone have any good reads for making sites mobile ? please ping me
 
@DanPantry And I will give you a little credit, Visual Studio is sometimes such a pain in my arse it's not worth it.
 
1:27 PM
@Malachi Define site, define mobile
 
When we first started on this project, we evaluated four different technology stacks. And the fact is that ALL of them did the job. Fortunately, I got to pick the technology that I liked.
 
@Malachi Define "mobile"? You mean Mobile friendly? Or "sites on a plane"?
@Donald.McLean That's a nice trait I wish I had here.
 
@Malachi An MCV is mobile and a (construction) site
 
@EBrown "sometimes" - it's crashed 5 times on me today alone
 
@Mast a website, nicely viewable on an iPad
 
1:28 PM
Apparently it does not like typescript
 
I got stuck with repairing code that someone else wrote (who happens to be our Sysadmin) which is all VB.NET.
 
at least that is the definition I am using
 
@EBrown Is Samuel L Jackson in that one too?
 
@DanPantry It's still a better choice than Node.js. Or Ruby on Rails.
 
@Malachi design with mobile in mind first, and scale up to desktop - not the other way around
 
1:29 PM
@Donald.McLean I would hope so.
 
@EBrown why are you comparing Visual Studio to NodeJS or ruby on rails? lol
 
@Malachi CSS?
 
@EBrown sounds like you work for the same company I do
 
@DanPantry I Was still on the Angular.js bit.
 
@EBrown why are you comparing angularjs to nodejs or ruby on rails?
 
1:29 PM
@Malachi Stick the good stuff in the middle and make it very scrollable. 20/60/20 is a good ratio for left/mid/right.
 
@Malachi you may want to answer that vb.net question..
 
angularjs is a front end mvc framework.
 
Make it as resolution independent as you can.
 
there's still somet things that can be said...
 
nodejs is a server framework. ruby on rails is a MVC web server framework. they are all different things.
AFK
 
1:30 PM
@DanPantry @Mast @Quill I am looking to learn about making mobile ready sites. that is why I asked for reading material
@Vogel612 what?
 
@Malachi It's a pain in the arse. I hate working in VB.NET.
2
 
3
Q: Storing data into an SQL table using multiple threads and queues

cozkulI have a process running in a separate thread which reads data over Ethernet and raises an event for each read. Then, this data is processed over a tree of classes. At the top of my class tree, I want to store the processed data to SQL tables. This read rate can be rather fast and often at times ...

 
@EBrown ditto
 
there's worse
 
@DanPantry My mistake, I forget Angular is a sister to jQuery.
 
1:31 PM
it's a pain to work with legacy code, regardless of language
4
 
@Vogel612 This isn't "legacy", so to speak.
 
then enjoy it!
 
@EBrown someone actually wrote tests for VB?
 
Though, the original programmer (our Sysadmin, who is not built to be a programmer) never saw a Using directive in his life.
@RubberDuck I wrote a few for the stuff we do, yeah.
Which was another thing our original programmer never saw: Unit Tests.
 
That ^^^ I'm struggling with that right now too.
 
1:33 PM
@Malachi I don't know about reading material exactly, but you should look into media queries. Media queries let you set css rules depending on device width, height, capabilities, etc
 
@RubberDuck Let me know if you need any help with it, I use them all the time. Life would be so much more dull without them.
 
No tests == Legacy code. I don't care if it was written 5 minutes ago.
 
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
            .content {
                margin: 60px auto 20px auto;
            }
        }
 
@RubberDuck Hah, well in that case it's as legacy as it gets.
 
Lol. No. I know what it is. The guy before me sure didn't though.
 
1:34 PM
This should probably be on codereview.stackexchange.com, though I'm not sure they would do much more that replicate @depperm — gabe3886 24 secs ago
 
@RubberDuck Isn't that the worst? Did the guy before you at least use semantic variable names?
 
thevar is all over this code base..
 
@RubberDuck Awful.
 
Here are a few of the variable names he used: StLicDate, ActMgrNum, StCompDate, RPExp.
 
Copy pasta programming ftw
 
1:35 PM
Which all mean (in order): State License Expiration Date, Account Manager Number, State License Comparison Date, Rewards Points Expiring.
 
Never would have guessed the later.
 
Yeah, yesterday, I literally turned a double switch (around 60 lines) into a five line dictionary
 
Then there's the dreaded: lblAddr1 (it's a label on the frontend).
And, even worse: no OOP at all.
 
Removed thousands of LoC by creating a base class today...
 
I removed a few thousand a few months ago.
They finally let me start rewriting this website MY WAY, and it's tripled performance, and cut down on maintainability costs by like 50%.
Which is what happens when you get a competent programmer to do the job.
 
1:37 PM
Yeah... I've got my first peer review Monday. They're gonna shit themselves.
 
We don't have peer-reviews.
 
It's kinda sad when you find empty if-else statements or other pointless code in the existing code.
 
I insisted on it.
 
Oh man, I should show you guys some of the crap I waled into.
This is VB.NET, and he was still using the archaic IsNothing(var) rather than var Is Nothing.
 
Anyway btw.
 
1:38 PM
@RubberDuck Last time I tried such a thing, nothing happened.
 
Dim dotwcount As Integer: dotwcount is Deals of the Week Count.
 
1:53 PM
Yuck. Loaded my JS Windows side for once. Notepad++ doesn't automatically detect the formatting for some reasone, while Atom does...
 
Greetings
 
monking @Ismael
 
@DanPantry But it's not morning...
 
@IsmaelMiguel it's monking somewhere in the world
 
I live in UTC time
 
2:02 PM
@IsmaelMiguel it's happy hour somewhere
 
 
And yes, it is happy hour somewhere
But not here
 
I created the room before I moved the messages. next time I will see if I can create a room in that dialog <-- probably made by jQuery
 
disregard that I checked, and it seems that's a mod thing..
 
BTW.Work
 
2:18 PM
0
Q: Reading input from console in F# (as a sequence of lines)

user7610Consuming input line-by-line until the end is often useful. In C# I would write the following loop while ((line = Console.ReadLine()) != null) {. I wanted to do this using "idiomatic" F# (which to me includes avoiding let mutable) and I came up with this: let rec readlines = seq { let line ...

 
If you are more curious about your code quality you can go to codereview.stackexchange.comarshpreet 57 secs ago
 
0
Q: parsing characters with parsec

akonsuI am trying to parse escape sequences as well as plain characters. The code is below, can this be made more succinct? import Control.Applicative import Data.Char import Numeric import Text.Parsec hiding ((<|>)) echar :: Parsec String () Char echar = (char '\\' >> ((char 'b' >> return '...

0
Q: Finding out if a word is an Anagram of another

HussienKThe question was to see if a word is an anagram of another word. Here's my working solution. How would you improve it? Returns True if anagram, False otherwise. # write the function is_anagram def is_anagram(test, original): for letter in test.lower(): if letter not in original.lower...

0
Q: Table structure for Hotel reservation system with Discounts and Deposits

Dev14I'm making an hotel reservation app.It has the following features Promo Codes The guest can choose to pay half a certain percent of the total_amount or the entire total_amount I want to use stripe,paypal and authorize.net as payment gateways. Reservations are stored here CREATE TABLE `reservat...

0
Q: Alarm clock nested if loops, need to make it simpler

noob81I know there must be an easier way to write this but I'm stuck in over-complicating mindset instead of just following the Zen of Python, please enlighten me to the ways of simplicity... Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are on vacat...

0
Q: Generating prime candidates

rubikI'd like to generate an infinite list of prime candidates of the form 6k±1, but I'm looking for the fastest possible solution. Currently I have this: primeCands :: [Integer] primeCands = concatMap (\i -> [6*i-1, 6*i+1]) [1..] but I feel that concat is wasting too much time. Using all the odd ...

 
2:39 PM
@CaptainObvious can we get this user some rep to chat? --> chat.stackexchange.com/rooms/8595/the-2nd-monitor
 
@Malachi done
 
carp....why didn't it Copy the share link?
 
hmm..
I'd say that one's better off on DBA..
 
0
Q: refactor this code angular code

Paul Fitzgerald function getAllBookings(day, countryCode) { return Bookings.get({ "day": day, "country": countryCode }).$promise.then(function (data) { return data.total; }, function (errorResponse) { console.log("Error") }); }...

 
@CaptainObvious Needs some edit.
 
2:55 PM
@CaptainObvious soo.. DBA would take this question...
and I think it's off-topic for CR
opinions?
related ages old meta:
8
Q: Are database design reviews in scope?

BenVSee this question: Can you peer review my database design for a school system?

 
Why do you think it's off-topic?
 
It's purely DDL
-> Structure and Design
no "thinking code" so to say
and as such a Design only question, which is off-topic for CR
 
a create table script is reviewable on CR, it's SQL code and we can review SQL code.
 
meh..
it's Design and thus off...
 
@Mast the should be left there because it is about the structure of the table
 
3:03 PM
sure we can review SQL code, but DDL != DML / DQL
I'd say a DDL only question is a design review and off-limits
 
people can request if code follows Design Patterns.
 
But the meta post you linked seem to be in favour of keeping it
 
> Higher-level architecture and design of software systems
--> off-topic
@jacwah that's from 3 years ago
private beta from what I can see
 
how do you get Data Definition Language? it SQL. those are Create Table scripts that need to be run.
 
Sure, why don't you create a new answer?
 
3:05 PM
also we only recently abolished Design Questions
@jacwah at work right now, and also wanted to hash it out a little
It's easier to write a good answer when you know the opponent's arguments
@Malachi SQL is a mesh of three different things.
DDL, DML and DQL
sometimes the latter two are bundled
DDL is "create table" stuff
 
@Malachi It had 3 tags on there. and . That's bull.
 
^ that
and DDL is "design"
it's the Skeleton upon which you can then run DML things like "UPDATE ... SET asd WHERE ..."
or DQL things like "SELECT ... FROM table WHERE ..."
 
Create scripts creates an object. like classes do, or Structs
 
meh
 
Could you like the meta about not allowing design?
 
3:09 PM
go review a struct.. and only the struct
and now tell me it's not design
 
I don't play much in Database.SE is it truly on-topic there?
 
0
Q: AL N*N Tic Tac Toe Game

MORTALhere simple Tic Tac Toe Game. I would like to know, How to improve this code further? Code #include <iostream> #include <cctype> #include <array> #include <random> enum struct Player : char { none = '-', first = 'X', second = 'O' }; std::ostream& operator<<(std::ostream& os...

0
Q: Creating a complex hierarchy for "Player Effects"

Markus MeskanenI'm coding a plugin for a game that has a Player class which has a boolean attribute frozen, which decides if the player is frozen or not. There are more "effects" like frozen, but I'm using it as an example, since solving one should solve them all. The problem is, this frozen attribute only sup...

 
20
Q: Reviewing "design"

Simon André ForsbergIt has been said in various comments that on Code Review we review code and not design. I find this statement not very clear though. Obviously, if someone has an UML and not any written code, that's off-topic on Code Review. However, if there is a question with a finished implementation, such a...

@Malachi I already checked back in chat and they'd revert your edit partly, but yes it seems in scope
they even got a tag over there
 
you may write using namespace std it promotes clarity. — anshabhi 5 mins ago
 
it's not that .. seldom
 
3:12 PM
Burn it. Burn it!
 
@Vogel612 "So I would say that if the question contains code, and the asker wants the design of that code reviewed, there's absolutely nothing wrong with that, but if the asker wants something that is not code reviewed, it's off topic."
 
5
A: Do we still need a database tag like [database-schema]?

PhrancisNo, we don't. Merge them into database I say. I just don't really see a need. There is a whole SE site dedicated to DB Administration, and schema-design/database-design is more looking at charts and concepts than code generally.

 
So it's whether you consider SQL code or not
 
not quite
it's whether I consider DDL code or not
 
> There is a whole SE site dedicated to DB Administration, and schema-design/database-design is more looking at charts and concepts than code generally.
the question in question has code
 
3:14 PM
Maybe someone could talk to the mods at DBA?
 
@jacwah I already had a quick talk with some folks in their main chatroom
 
I've posted similar questions on DBA.
 
@jacwah we shouldn't migrate it, if it is on-topic here
 
Or, a similar question, I should say.
 
in The Heapâ„¢ - Consultancy ©®, 21 mins ago, by Paul White
What say we accept it and see what happens?
 
3:15 PM
Monking!
 
one of the first rules of migration is, if it is on-topic, don't
 
@Malachi meh. not quite but ...
anyways I consider it off-topic
 
It's a really good fit for DBA, should he want it there.
 
can it be migrated after it's closed? let's have the community VTC before we flag it for migration
 
I can't VTC.
 
3:16 PM
@Malachi good
 
</afk> but after noticing how many messages there are here I'm considering going <afk> again...
 
Didn't I hear earlier it's on-topic here?
 
@Mast it's kind of a debate we are having, I am waiting to give a review/answer until it is decided by the community to leave open or close
 
I need 18 rep for VTC :(
 
I Need a bunch I think.
Oh crap
I don't need any
Already have it.
Well damn, I was unprepared for that.
 
3:24 PM
:)
 
Voted.
 
there you go. Remember, with great power comes great responsibility
 
I rarely (if every) D/V or VTC.
I flag things I think are spotty.
 
it's not going to show up in the review queue is it?
 
it should..
 
3:27 PM
I have been waiting for it to show up since you cast your close vote, and it hasn't shown up yet....
 
I just casted one too.
 
wonder if it is one of those "every 15 minutes" things or maybe a "every 30 minutes" things
 
Probably.
 
or maybe it doesn't show for me because I have the tab open and have visited the question
 
doubt it..
anyways I'll be off to commute
 
3:39 PM
0
Q: Depth first search and breadth first search

ValerinI'd like some tips for refactoring separately, from the Graph class, both methods: class Vertex(val label: Char) { var wasVisited: Boolean = false def printvertex = println(label) } class Edge(val source: Vertex, val destination: Vertex) { def printedge: Unit = println(source.label + ", " ...

 
it came through and I cast my vote
 
I'm surprised you didn't just test this yourself to find out, but failing a test does not return but raise an AssertionError (an exception). The rest of this question might be better over at codereview.stackexchange.com instead! — Two-Bit Alchemist 21 secs ago
@Dominik, I post my question to : codereview.stackexchange.com and it got rejected — user177931 36 secs ago
@Dominik CodeReview is for questions that already work. Because this question has a flaw and does not work properly, it is not a good fit there. After the OP fixes any and all issues with it, then it may be suitable. — EBrown 53 secs ago
 
3:54 PM
@Duga Yes, because it's off-topic.
 
@Mast What does replying to the bot do?
 
@EBrown more like thinking out loud
 
@EBrown Indicating to what it is a response. Nothing more.
 
Ah, I thought it might actually post that as a comment.
 
I doubt @Duga minds to be pinged.
 
3:57 PM
It makes me wonder how many notifications @Duga has when simon logs in as her...
 
@EthanBierlein Lol Probably all of them?
 
@EthanBierlein Thousands.
2
Why doesn't @Duga have the enthusiast and fanatic badges yet?
She's been here every day for as long as I can remember!
 
@Mast Because it's only active in chat?
 
So?
It's still a log-in, right?
 
Not to CodeReview, IIRC.
 
3:59 PM
And this chat is explicitly linked to CR.
I guess the link isn't good enough.
 

« first day (797 days earlier)      last day (3203 days later) »