Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

darthbob88 posted:

AngularJS question: Is there any reason I wouldn't be able to use Angular expressions inside another directive? I'm trying to create a carousel using this plugin and this config. It'll print item.logo and item.title just fine, and outputs {"foo":"bar", "baz": "qux"} for item.pages, but the ng-repeat just prints nothing. I can't find any good explanation anywhere else.
code:
  <ui-carousel slides="siteConfig.menu" slides-to-show="6" slides-to-scroll="4" initial-slide="1" class="ui-carousel">
                            <carousel-item>
                                <img ng-src="{{item.logo }}" alt="{{item.title}}">
                                {{item.pages}}
                                   <a class="sql-menu-item"
                                       href="{{page}}"
                                       target="_self" ng-repeat="name in item.pages">
                                        {{name}}
                                    </a>
				</carousel-item>
                        </ui-carousel>
E: Apparently this is a known issue with transcluding ng-repeat. Might be able to use this to push back again and get us using something other than AngularJS.

Maybe don't use transclusion? Or just create an inner component and transclude that?

code:
<carousel-item>
	<transcluded-thing/>
</carousel-item>

Adbot
ADBOT LOVES YOU

The Dave
Sep 9, 2003

Love Stole the Day posted:

Hello, I am still trash but I've since implemented almost all of the suggestions you guys gave to make my portfolio project be less pathetic. Please tell me why it is still not good enough to get an interview with tia: https://wanderrful.github.io/korean-learning-app/

Things I did since last time I posted:
  • Created a separate back-end Express server on Heroku that serves a PostgreSQL DB table with data for the front-end linked above
  • Removed the ugly checkmark and replaced it with a Bootstrap thing that looks marginally less dumb
  • Added a "wrong guesses" list that shows your previous 3 attempts
  • Added a popover hint message for the current problem if you make more than 2 wrong guesses
  • Added alternate answers so that synonyms can also work
  • Added more words to the database so that there's 6 things now

Answers to each prompt to help you get through it quickly:
  • secret
  • pencil
  • chicken OR chicken meat OR poultry
  • hug OR to hug OR embrace OR to embrace
  • unemployed
  • indecision OR indecisiveness
2 minute UX audit:

"Hey there! This app is still in development!" is in too threatening of a treatment, it also steals the focus of the page when it's more of a footnote.

"Translate to English" could use a punchier title. Even if it's just "Korean to English Quiz".

Question 1 of 6 could just be "1 of 6" and a little smaller

I'm not sure if omitting a submit button is good for accessibility or if the enter to submit has you covered. Agreed that it could use instructions.

I'd blow up the size of the Korean characters by like 200%-300%

Maybe add a hint after 1 or 2 wrong guesses. Oh wait this is there, maybe it needs to pop up sooner and just as inline text under the input.

Success feels really lackluster.

Maybe on the last page show the full Korean/English list again.

Capri Sun Tzu
Oct 24, 2017

by Reene

The Dave posted:

2 minute UX audit:

"Hey there! This app is still in development!" is in too threatening of a treatment, it also steals the focus of the page when it's more of a footnote.

"Translate to English" could use a punchier title. Even if it's just "Korean to English Quiz".

Question 1 of 6 could just be "1 of 6" and a little smaller

I'm not sure if omitting a submit button is good for accessibility or if the enter to submit has you covered. Agreed that it could use instructions.

I'd blow up the size of the Korean characters by like 200%-300%

Maybe add a hint after 1 or 2 wrong guesses. Oh wait this is there, maybe it needs to pop up sooner and just as inline text under the input.

Success feels really lackluster.

Maybe on the last page show the full Korean/English list again.
I agree with this audit.
The header is too aggressive. In general use red for serious errors, delete actions, etc.
Enter for submit is programming-thinking, and not great UX. Include a button, and also put "Press enter to submit" in the input placeholder or as a label on the page.

As an aside, your portfolio will be judged on the design and UX. It's bullshit if you're just trying to prove you can code, but the fact remains that good visuals and transitions impress people. Making sure your portfolio is polished visually is like showing up to an interview well groomed and dressed nicely. Hiring a designer to do a quick pass can make a world of difference and might be something to consider.

darthbob88
Oct 13, 2011

YOSPOS

Skandranon posted:

Maybe don't use transclusion? Or just create an inner component and transclude that?

code:
<carousel-item>
	<transcluded-thing/>
</carousel-item>

Might well create an inner component if I have time later, but right now I'm going with a dumber idea. There are only 5 or 6 possible values that could be keys in item.pages, so I'm just going down the list and saying
code:
<a class="sql-menu-item" 
                                       ng-show="{{!!item.pages['foo']}}"
                                       ng-href="{{item.pages['foo']}}">
                                        {{"Foo"}}
                                    </a>
It compiles, and runs, and does what it should, and frankly I no longer care about quality on this pile of nonsense.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

Lumpy posted:

Flask, not much. Django, a bunch, but Django is a much more "batteries included" framework. The official Django tutorial is a good read (you don't have to actually follow along or even know python much) to see what it's all about.

Basically, Flask is React: it makes views easy, but you figure out all the other crap. Django is like uh.. Ember maybe? You do things it's way.

So if I want to teach myself Python and learn how to write REST APIs simultaneously, should I start with Python or just dive into one of these frameworks?

I have experience writing pretty simple HTTP requests in PHP and curl, if that makes a difference, but setting up routes and writing clean, concise classes is something I don't really know how to do.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Grump posted:

So if I want to teach myself Python and learn how to write REST APIs simultaneously, should I start with Python or just dive into one of these frameworks?

I have experience writing pretty simple HTTP requests in PHP and curl, if that makes a difference, but setting up routes and writing clean, concise classes is something I don't really know how to do.

I always find learning a language without some sort of project is frustrating, so I'd dive right into a framework. django-rest-framework is good as gently caress if you don't care intensely about learning everything from the ground up and want to focus mainly on the business of writing a functional API.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Grump posted:

So if I want to teach myself Python and learn how to write REST APIs simultaneously, should I start with Python or just dive into one of these frameworks?

I have experience writing pretty simple HTTP requests in PHP and curl, if that makes a difference, but setting up routes and writing clean, concise classes is something I don't really know how to do.

Writing stuff from scratch is a good and cool thing to do.

However, there are many months of work between vanilla python and having an HTTP rest api.

In other words, you should use a framework.

(but if you ever have the wherewithal, you should definitely write a webserver or web application server from scratch. It's a super awesome learning experience and not as hard as you might at first think.)

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
Cool sounds good.

I guess my last question for now is what are the most popular tools for local development? Is there Python/Django/Flask equivalent of XAMPP?

teen phone cutie fucked around with this message at 23:07 on Mar 28, 2018

huhu
Feb 24, 2006

Grump posted:

Cool sounds good.

I guess my last question for now is what are the most popular tools for local development? Is there Python equivalent of XAMPP?

Django has a built in runserver command that will launch a server for local development.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Yeah, you don't need anything but python and django (or flask) to do local dev.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
Oh sick. Even databases too?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Grump posted:

Oh sick. Even databases too?

Well, python/django can use sqlite for local dev which is good enough because you're just going to be using the Django ORM which abstracts away the DB.

(actually once you know what you're doing you may want to use postgres during local dev because you'll likely begin using some raw sql for performance reasons at some point, but installing postgres for django is easy as I just described in another thread.)

Capri Sun Tzu
Oct 24, 2017

by Reene

Grump posted:

So if I want to teach myself Python and learn how to write REST APIs simultaneously, should I start with Python or just dive into one of these frameworks?

I have experience writing pretty simple HTTP requests in PHP and curl, if that makes a difference, but setting up routes and writing clean, concise classes is something I don't really know how to do.
Learning for learning's sake ain't bad but not all knowledge is equally useful.These days I feel like knowledge invested into a framework is more useful than knowledge invested into something lower level like this especially from a career perspective. Maybe implement something algorithmic like a poker hand evaluator or what have you, learning algorithms is a good way to dig into the nuances of a language and is itself a more transferable skill than learning something that 1000 frameworks in every language can already do.

huhu
Feb 24, 2006

Capri Sun Tzu posted:

Learning for learning's sake ain't bad but not all knowledge is equally useful.These days I feel like knowledge invested into a framework is more useful than knowledge invested into something lower level like this especially from a career perspective. Maybe implement something algorithmic like a poker hand evaluator or what have you, learning algorithms is a good way to dig into the nuances of a language and is itself a more transferable skill than learning something that 1000 frameworks in every language can already do.

I'd say learning how a backend framework functions would be a pretty good takeaway here.

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you

Just finished implementing or attempting to address each and every point/suggestion that the two or three of you guys made in response to my last post, quoted above. Thanks so much for the audits.

I hope that this, in its current state now, is sufficient for a non-garbage portfolio project: https://wanderrful.github.io/korean-learning-app/

Capri Sun Tzu
Oct 24, 2017

by Reene

Love Stole the Day posted:

Just finished implementing or attempting to address each and every point/suggestion that the two or three of you guys made in response to my last post, quoted above. Thanks so much for the audits.

I hope that this, in its current state now, is sufficient for a non-garbage portfolio project: https://wanderrful.github.io/korean-learning-app/
Better! The empty progress bar is confusing, maybe hide it until the first question is answered. I would ditch the "press enter to submit" label since you also have it as a placeholder.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Capri Sun Tzu posted:

Better! The empty progress bar is confusing, maybe hide it until the first question is answered. I would ditch the "press enter to submit" label since you also have it as a placeholder.

Another idea is to have a "press enter to submit" tip pop up if the user enters a response but doesn't do anything else within some amount of time. That way you're not bothering a user who knows what to do, but helping someone who might have missed the placeholder.

My Rhythmic Crotch
Jan 13, 2011

Hey all, I have been building this for a while and wanted to get some eyeballs on it.

https://4lo.co

The domain name doesn't mean anything, I just wanted something short and kinda funny. It's my attempt to create a discussion site that has anti-shitposting mechanisms baked-in. Rather than try to describe all the stuff it has and can do, I made several demo threads on the site itself.

I'm interested to see if people "get" it. How to browse, how to navigate, etc. Is anyone here brave enough to create an account and try messing with it? Thanks for any volunteers. It's hosted on a $13 VPS, so let's see if it holds up.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



My Rhythmic Crotch posted:

Hey all, I have been building this for a while and wanted to get some eyeballs on it.

https://4lo.co

The domain name doesn't mean anything, I just wanted something short and kinda funny. It's my attempt to create a discussion site that has anti-shitposting mechanisms baked-in. Rather than try to describe all the stuff it has and can do, I made several demo threads on the site itself.

I'm interested to see if people "get" it. How to browse, how to navigate, etc. Is anyone here brave enough to create an account and try messing with it? Thanks for any volunteers. It's hosted on a $13 VPS, so let's see if it holds up.

Tried to make an all-emoji username - that errored with something cryptic about registration not working in general. Tried again with just regular ASCII username and am not getting the email and yeah I checked my spam.

e: either I spoke too soon or you saw this and did something but I got the email

Munkeymon fucked around with this message at 16:19 on Apr 3, 2018

My Rhythmic Crotch
Jan 13, 2011

I'll have to add validation for non-ascii usernames, that's something I had not thought of yet.

Checking with Elastic mail, it says the activation email has been sent, but not read. Gmail has never filtered these before, hmm. I'll just manually activate your account.

edit, nevermind!

Capri Sun Tzu
Oct 24, 2017

by Reene

My Rhythmic Crotch posted:

Hey all, I have been building this for a while and wanted to get some eyeballs on it.

https://4lo.co

The domain name doesn't mean anything, I just wanted something short and kinda funny. It's my attempt to create a discussion site that has anti-shitposting mechanisms baked-in. Rather than try to describe all the stuff it has and can do, I made several demo threads on the site itself.

I'm interested to see if people "get" it. How to browse, how to navigate, etc. Is anyone here brave enough to create an account and try messing with it? Thanks for any volunteers. It's hosted on a $13 VPS, so let's see if it holds up.
Hell yeah finally a good SA replacement. LEts get this party started https://4lo.co/#/thread/9

Capri Sun Tzu
Oct 24, 2017

by Reene

My Rhythmic Crotch posted:

anti-shitposting mechanisms baked-in
I will put this to the test immediately. Also can I be mod

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

My Rhythmic Crotch posted:

Hey all, I have been building this for a while and wanted to get some eyeballs on it.

https://4lo.co

The domain name doesn't mean anything, I just wanted something short and kinda funny. It's my attempt to create a discussion site that has anti-shitposting mechanisms baked-in. Rather than try to describe all the stuff it has and can do, I made several demo threads on the site itself.

I'm interested to see if people "get" it. How to browse, how to navigate, etc. Is anyone here brave enough to create an account and try messing with it? Thanks for any volunteers. It's hosted on a $13 VPS, so let's see if it holds up.

Where are your terms of service and privacy policy!!! :argh:

EDIT: I got a lot of 500 errors trying to make a new thread. I clicked around some, then tried again and it worked.... :iiam:

Making new threads is confusing and / or broken if you pick anything in the 'Forum' drop down.

Lumpy fucked around with this message at 17:25 on Apr 3, 2018

My Rhythmic Crotch
Jan 13, 2011

Capri Sun Tzu posted:

I will put this to the test immediately. Also can I be mod

no you can't be mod, and a lot of it depends on people actually being embarrassed if their dumb posts get front-paged

The Fool
Oct 16, 2003


My Rhythmic Crotch posted:

no you can't be mod, and a lot of it depends on people actually being embarrassed if their dumb posts get front-paged

Have you seen reddit?

My Rhythmic Crotch
Jan 13, 2011

The Fool posted:

Have you seen reddit?
I have like 2-3 other mechanisms that are more... severe, let's say, that I haven't implemented yet.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Can't submit emojis as post text, either :doom:

(I love testing text inputs with emojis because it often reveals silly text handling bugs/bad assumptions)

huhu
Feb 24, 2006
Do you guys use PUT and DELETE for http request methods? Am I bad because I only use GET and POST? Also, why do I only get asked the difference between GET/POST in interviews?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

huhu posted:

Do you guys use PUT and DELETE for http request methods? Am I bad because I only use GET and POST? Also, why do I only get asked the difference between GET/POST in interviews?

yes, yes, most places/developers/organizations/interviewers are bad

Veni Vidi Ameche!
Nov 2, 2017

by Fluffdaddy
This is not strictly web-related, but it seems to fit better here than in other threads.

I have two XML files which look something like this:

File #1:
code:
...
  <an_object>
    <name>A unique name</name>
    <value_1>Value 1</value_1>
   <value_2 />
  </an_object>
  <more objects ...>
...
File #2
code:
...
  <an_object>
    <name>The same name as in file 1</name>
    <value_1>Maybe the same value as file #1, maybe a different value</value_1>
    <value_2>Maybe a value, here, maybe blank like in file #1</value_2>
    <value_3>A value that exists here, but not in file #1</value_3>
  </an_object>
...
I want to combine file #2 with file #1, using the <name> field to identify which objects should be merged. Information in file #2 should overwrite information in file #1 when it exists in both places. Information that exists in the objects in file #2 should be added to the matching object in file #1 if that information does not already exist in file #1.

I can grab an XML library and roll my own solution, but I'm wondering if there is an existing tool that will do this, for me. I'd prefer something I can run from a Linux or Windows command line, but I'll take anything that works.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

huhu posted:

Do you guys use PUT and DELETE for http request methods? Am I bad because I only use GET and POST? Also, why do I only get asked the difference between GET/POST in interviews?

Yes, but only because the APIs Thermopyle codes for me use them. :argh:

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Lumpy posted:

Yes, but only because the APIs Thermopyle codes for me use them. :argh:

hahahahha!

(now if only I could be consistent about it)

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

huhu posted:

Do you guys use PUT and DELETE for http request methods? Am I bad because I only use GET and POST? Also, why do I only get asked the difference between GET/POST in interviews?

Well I mean. Those are the only real ones, plus OPTIONS and HEAD the others are artificial and are only possible by adding a hidden field or a query parameter, or request header. Unless you're using fetch I suppose. The whole thing is more ideological than practical but there are die hards out there.

Supposed to do:

code:
GET /products
POST /products
GET /products/id
PUT /products/id
DELETE /products/id
But then you also usually need:

code:
GET /products/new
GET /products/id/edit
Which is messy no matter what you do. And the "new" route is especially bad because "new" could as easily be an id so it's a special case. Therefore the PUT and DELETE routes aren't really the biggest problem. You may as well have:

code:
GET /products
GET /products/new
POST /products
GET /products/id
GET /products/id/edit
POST /products/id
GET /products/id/delete
Or, switch to any other system aside from REST. Like RPC for example, beautiful, sane, RPC.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Nolgthorn posted:


But then you also usually need:

code:
GET /products/new
GET /products/id/edit

why?

reversefungi
Nov 27, 2003

Master of the high hat!

Nolgthorn posted:

code:
GET /products/new
GET /products/id/edit

Why would these be different from
code:
POST /products
PUT /products/id
?

:confused:

Unless you mean "get me the newest products" for the first example, in which case I'd probably just use a query string of some sort.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
What? No. I mean you need a page that displays a way to "Create product" and you need a page to "Edit product", those are routes that generally have to exist.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India
Why would you not use e.g. a delete request to delete a resource, why make an additional get route for it?

Gmaz fucked around with this message at 12:47 on Apr 4, 2018

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Nolgthorn posted:

What? No. I mean you need a page that displays a way to "Create product" and you need a page to "Edit product", those are routes that generally have to exist.

If your API is displaying web pages, you many not actually have an API.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
k.

Gmaz posted:

Why would you not use e.g. a delete request to delete a resource, why make an additional get route for it?

what's the difference.

Adbot
ADBOT LOVES YOU

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Nolgthorn posted:

What? No. I mean you need a page that displays a way to "Create product" and you need a page to "Edit product", those are routes that generally have to exist.

API's don't display pages though?


Nolgthorn posted:

what's the difference.

One is clear and explicit and you can understand what it is for without knowing anything about the API. The other is unclear and implicit and you have to read the documentation to understand.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply