Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

12-27-2017 , 05:40 PM
Is the whole video a joke or is it just unintentionally funny?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-27-2017 , 05:49 PM
Washburn sponsored him, and Solar is his line of guitars, though he since split from Washburn to create his own brand called... Solar.

He's intentionally giving a funny demo of the guitar.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 12:27 AM
any js people have serious opinions about jsdoc? (comment format for describing functions particularly what types the params/args are and what types it returns) I know its old-ish but it seems like a perfect replacement for nonsense like typescript i.e. the only place I don't know types implicitly is in function args and some times function returns.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 01:06 AM
My experience with documentation systems that scrape comments to make docs is that they are almost always wrong. If there's no way to enforce their correctness, they decay with alarming speed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 10:57 AM
Quote:
Originally Posted by Grue
any js people have serious opinions about jsdoc? (comment format for describing functions particularly what types the params/args are and what types it returns) I know its old-ish but it seems like a perfect replacement for nonsense like typescript i.e. the only place I don't know types implicitly is in function args and some times function returns.
Quote:
Originally Posted by RustyBrooks
My experience with documentation systems that scrape comments to make docs is that they are almost always wrong. If there's no way to enforce their correctness, they decay with alarming speed.
Agreed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 11:19 AM
BTW we are using RAML for endpoint documentation, and it's the same deal - if you don't keep on top of it, it will decay. So I wrote a series of tests that try every API in the RAML spec. We require that every endpoint has an example in the RAML docs, so we run the example and check that it produces a response that matches the response schema. It's not perfect but it's better than nothing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 11:28 AM
What I hate about auto generated docs is they don’t really tell you anything you can’t see looking at the code, and you’re going to have to look at the code to figure out what the thing is doing anyway.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 12:01 PM
Quote:
Originally Posted by kerowo
What I hate about auto generated docs is they don’t really tell you anything you can’t see looking at the code, and you’re going to have to look at the code to figure out what the thing is doing anyway.
Right but we're talking about doc systems that allow you to add details via comments to the code. Something like "swagger" for APIs for example, lets you document what the parameters "mean", what the function returns, what the function "does" etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 12:38 PM
Yeah, that’s what I was talking about, we were looking to use 3Scale to document and generate examples of our API and I looked into other types of auto docs and none of the examples had basic descriptions of API calls, just the interface. Regardless of the tool or if the docs lived in the code or someplace else, you still only got out of it what you put into it. If you couldn’t get your devs to buy into the work of documentation you weren’t going to get it magically from some kind of AML...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-28-2017 , 04:12 PM
Well, for our RAML stuff, if you don't meet the minimum documentation requirements, the build doesn't pass. I 100% agree that unless there is a mandate and enforcement, documentation is garbage. I like to call our wiki "the place where information goes to die"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-30-2017 , 05:09 AM
I posted this to my buddy earlier in slack. Background: We are both really interested in working in Elixir (which pattern matching and piping are kinda important concepts) and I currently work as a UI dev [we are transitioning from knockoutjs to vuejs] :

I pushed this bit of code earlier today. In Elixir, its called piping. Here it is :

Code:
<div class="list-name">{{ audience.name | truncate}}</div>
Basically, what this says is
Quote:
pipe the return value of audience.name into truncate
Quote:
since audience.name is not a method its literally then just pipe the value of audience.name as the first argument of truncate.
But... you need to declare that truncate method as a 'filter' in vuejs in order to be able to use that special piping syntax. Truncate method is very simple method (written by me ldo)
Code:
truncate = (str, maxLength = 25) => {
  return str && str.length > maxLength ? str.slice(0, maxLength) + '...' : str
}
Through the magic of ES6, we now get default arguments. If no second argument exists, the string gets a max length of 25 and gets truncated if its 26 characters or longer.

So anyway back to the question. Do you prefer the html markup I posted to you or...
Code:
 <div class="list-name">{{ truncate(audience.name)}}</div>

In this example, we can simply declare it as a method in the vue model. Its simpler and easier to grasp for js noobs.

Which do you prefer (and why ldo)?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-30-2017 , 08:31 AM
I have no opinion (think they're both easily understood) but I think it's weird to be transitioning out of one framework into another which is very much a fringe thing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-30-2017 , 07:59 PM
I'm not a fan of the truncate function. In particular, I have a heavy distaste for default params.

The default params have a bonus:

Code:
<div class="list-name">{{ audience.name | truncate 30}}</div>
Does that even work? If so, what kind of fun bugs are you going to chase later on? If not, what's the point of the default param if you are gong to be piping?

If you are going to use default params (please don't, but I digress), it would be better to use the function call approach.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-30-2017 , 10:08 PM
Personally the pipe looks cool so I would probably go with it until it proves to be more headache than it's worth.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 02:17 AM
Quote:
Originally Posted by Larry Legend
Personally the pipe looks cool so I would probably go with it until it proves to be more headache than it's worth.
Haha so much this
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 08:38 AM
Piping is great at the command line, but not sure how I think of it in JavaScript. The pipe looks like it could be confused with an "or'" operator in that context.

If double pipe means or in the same place, then I'd hate using piping at all.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 08:50 AM
Yeah, this seems easy to confuse with a simple or. Maybe a different operator for piping? R uses %>% for pipes, that is distinct enough to not cause any problems imo.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 11:12 AM
Quote:
Originally Posted by RustyBrooks
My experience with documentation systems that scrape comments to make docs is that they are almost always wrong. If there's no way to enforce their correctness, they decay with alarming speed.
This.

Also I’ve looked at hundreds of projects that tried to do some half-assed version of js-doc comments at some point. I haven’t met one developer ever who has used a jsdoc reader or any tool other than looking at jsdocs with their eyeballs. Which makes it worse than useless because it takes up so much valuable screen space. Do you really need to take up a whole line of code to describe what the @startDate parameter means?

Last edited by suzzer99; 12-31-2017 at 11:21 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 11:22 AM


Mexico gets it.

Btw on the road blog posts are actually happening now: https://forumserver.twoplustwo.com/9...-year-1664900/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 02:03 PM
Quote:
Originally Posted by suzzer99
Do you really need to take up a whole line of code to describe what the @startDate parameter means?
Disagree. if I'm looking at a function that has a parameter named "startDate" I'd love to know without debugging if its a new Date() object or a string in xx-xx-xxxx pattern or even a unix epoch ms (getTime()).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 04:24 PM
Quote:
Originally Posted by Grue
Disagree. if I'm looking at a function that has a parameter named "startDate" I'd love to know without debugging if its a new Date() object or a string in xx-xx-xxxx pattern or even a unix epoch ms (getTime()).
If I wrote it, it'll handle any of those. Eat it, daveT!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 04:42 PM
lmao
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 04:47 PM
I didn't write that, but I thought standard practice was to dump dates through 12 cycles of md5 first. So I'm not sure what the complaint is about either.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-31-2017 , 05:36 PM
Not sure if correct place for this or not and also x-posting to Homework/help thread. Feel free to delete if not.

I need a mentor to help/give guidance with using Python (specifically Dash/plotly libraries.) Willing to pay a reasonable rate. Hesitant to put code on here as it is work related and I figure having a mentor will enable to ask a lot more questions/pick up things a lot quicker. Please PM if interested.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-02-2018 , 01:46 AM
I've been really studying and working towards becoming an expert in the javascript language, and it's amazing how much faster things become when you have stronger fundamentals.

I look back at myself 6 months ago and compared to now I was ****ing useless. I cant wait to keep pushing and see where I'll be in another 6 months.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m