The Big Programming Thread - Page 966
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
TheEmulator
28057 Posts
| ||
Acrofales
Spain17185 Posts
On June 12 2018 07:34 TheEmulator wrote: I like bitbucket tbh. Some people are pretty against their UI tho. I personally use bitbucket more than github, but that doesn't mean I think Microsoft is out to steal the code I do have on github. Some friends use git lab and love it. So it's not as if there aren't any alternatives... and those are just the 3 major ones. And if you're really desperate, it really isn't *that* hard to mash together a git repository, source visualization and some automated testing tools on your own server. The main advantage of github and its competitors are its availability and convenience (and the trust that their backup system is safe... which git lab quite convincingly proved they can fuck up). | ||
Excludos
Norway7685 Posts
On June 12 2018 07:34 TheEmulator wrote: I like bitbucket tbh. Some people are pretty against their UI tho. Bitbucket is great, especially for private repositories. What github excels on in my opinion is the open and open source repositories which anyone can view at any time, download, and jump into the development of if they wish. Most git sites have some functionality which lets people do this, but nothing as good as github's. | ||
ShoCkeyy
7814 Posts
https://slack.engineering/taking-php-seriously-cf7a60065329 Slack uses PHP for most of its server-side application logic, which is an unusual choice these days. Why did we choose to build a new project in this language? Should you? Most programmers who have only casually used PHP know two things about it: that it is a bad language, which they would never use if given the choice; and that some of the most extraordinarily successful projects in history use it. This is not quite a contradiction, but it should make us curious. Did Facebook, Wikipedia, Wordpress, Etsy, Baidu, Box, and more recently Slack all succeed in spite of using PHP? Would they all have been better off expressing their application in Ruby? Erlang? Haskell? Perhaps not. PHP-the-language has many flaws, which undoubtedly have slowed these efforts down, but PHP-the-environment has virtues which more than compensate for those flaws. And the options for improving on PHP’s language-level flaws are pretty impressive. On the balance, PHP provides better support for building, changing, and operating a successful project than competing environments. I would start a new project in PHP today, with a reservation or two, but zero apologies. | ||
Manit0u
Poland17045 Posts
| ||
spinesheath
Germany8679 Posts
| ||
WarSame
Canada1950 Posts
| ||
Manit0u
Poland17045 Posts
On June 14 2018 11:18 WarSame wrote: Have any of you ever done a site with just OAuth? Is there anything I should be aware of? How do you link an account with different OAuths together? I've been doing stuff like that for the past 1.5 years. Here are some things you have to look out for: 1. Sessions How will you handle user sessions? Tokens are the most common way of handling this. 2. Authorization flow You'll have to decide on one. Some are safer but result in more round trips to external providers, others are simpler but not as secure (account that has been disabled in the provider might still be able to use your website until next login so no instant propagation). Here are simple explanations of those: https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2 We decided for an auth code grant flow. Where we checked people against external provider and then issued our own token to them so we don't have to do a round trip with every request. 3. Getting user data Just read on OpenID Connect which is a superset of OAuth. 4. Multiple providers per account Now this is a tricky thing. It's relatively easy to create identities instead of actual user accounts when using OAuth and then just hook identities to users. The problem arises when someone who already has an account and an identity tries to log in with a different provider. There simply is no common factor that will always be there. You could try checking emails but those can be different, if someone misspelled parts of their first and last name this is a no go too. Basically, you can do automatic user + identity creation when first logging in and then give people an option to "add other login" where they sign in with different provider and you just add an identity to the user (and now they'll be able to sign in with different providers) since you can't guarantee that you'll be able to automatically link all identities to specific user. If you have any additional questions just fire away | ||
Manit0u
Poland17045 Posts
| ||
ShoCkeyy
7814 Posts
https://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-oauth.html | ||
Deleted User 3420
24492 Posts
| ||
ShoCkeyy
7814 Posts
| ||
WarSame
Canada1950 Posts
On June 14 2018 17:19 Manit0u wrote: I've been doing stuff like that for the past 1.5 years. Here are some things you have to look out for: 1. Sessions How will you handle user sessions? Tokens are the most common way of handling this. 2. Authorization flow You'll have to decide on one. Some are safer but result in more round trips to external providers, others are simpler but not as secure (account that has been disabled in the provider might still be able to use your website until next login so no instant propagation). Here are simple explanations of those: https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2 We decided for an auth code grant flow. Where we checked people against external provider and then issued our own token to them so we don't have to do a round trip with every request. 3. Getting user data Just read on OpenID Connect which is a superset of OAuth. 4. Multiple providers per account Now this is a tricky thing. It's relatively easy to create identities instead of actual user accounts when using OAuth and then just hook identities to users. The problem arises when someone who already has an account and an identity tries to log in with a different provider. There simply is no common factor that will always be there. You could try checking emails but those can be different, if someone misspelled parts of their first and last name this is a no go too. Basically, you can do automatic user + identity creation when first logging in and then give people an option to "add other login" where they sign in with different provider and you just add an identity to the user (and now they'll be able to sign in with different providers) since you can't guarantee that you'll be able to automatically link all identities to specific user. If you have any additional questions just fire away Thank you. This seems like it will be difficult for me, so my questions will probably trickle in over the next few weeks On June 14 2018 23:17 ShoCkeyy wrote: WarSame, you should take a look at how Magento does it. Here's documentation on that. One of the CMS's I've worked with that brings OAuth. https://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-oauth.html Thank you for the reference! On June 15 2018 08:00 travis wrote: Are any of you experienced with the processes involved in creating a tech startup? I think I want to do that but I have so many questions I don't know where to start, and I don't have any money. But I do have a valuable product that has no competition and should have high demand. My main question is how I can come up with a reasonable valuation of my product, and how I can go about getting legal advice/representation with no money. I can't imagine doing a startup before working in the field is a good idea. I would highly recommend working as a developer for a few years until you are at least intermediate before working for yourself. | ||
WolfintheSheep
Canada14127 Posts
On June 15 2018 08:00 travis wrote: Are any of you experienced with the processes involved in creating a tech startup? I think I want to do that but I have so many questions I don't know where to start, and I don't have any money. But I do have a valuable product that has no competition and should have high demand. My main question is how I can come up with a reasonable valuation of my product, and how I can go about getting legal advice/representation with no money. If already have a product, get traction on it first. Successful Tech Startups are like 90% marketing and network, 10% everything else. The value of your product is in its user base and nothing else. | ||
Manit0u
Poland17045 Posts
On June 15 2018 12:38 WolfintheSheep wrote: If already have a product, get traction on it first. Successful Tech Startups are like 90% marketing and network, 10% everything else. The value of your product is in its user base and nothing else. Sure, but if you're going to approach potential investors with just an idea you better have a good business plan. That requires knowing how much it will potentially cost you to get a running prototype and how long will it take (for most things you'll probably need one or two developers and one graphic designer/front-end developer because it has to look pretty and a time frame of about 6 months). | ||
WolfintheSheep
Canada14127 Posts
On June 15 2018 17:04 Manit0u wrote: Sure, but if you're going to approach potential investors with just an idea you better have a good business plan. That requires knowing how much it will potentially cost you to get a running prototype and how long will it take (for most things you'll probably need one or two developers and one graphic designer/front-end developer because it has to look pretty and a time frame of about 6 months). Well, he said he had a valuable product. Wasn't sure if that meant he already had something, or just the idea for something. | ||
waffelz
Germany711 Posts
On June 15 2018 08:00 travis wrote: Are any of you experienced with the processes involved in creating a tech startup? I think I want to do that but I have so many questions I don't know where to start, and I don't have any money. But I do have a valuable product that has no competition and should have high demand. My main question is how I can come up with a reasonable valuation of my product, and how I can go about getting legal advice/representation with no money. Ask your professors! Pretty much every university that’s even just halfway decent provides programs / information and counseling for students who want to create a startup: They often even have means / funds allocated to support promising cases, possibly including infrastructure, technical support, logistical support and straight up money. EDIT: Also renaming the thread to "The big travis in the shark tank"-thread incoming? : D (shark tank was the US equivalent to the "pitch us your idea and we might invest" reality show, correct?) | ||
sc-darkness
856 Posts
Pointer points to something that must exist. Does compiler do some magic? | ||
Acrofales
Spain17185 Posts
| ||
iaretehnoob
Sweden741 Posts
On June 16 2018 18:00 sc-darkness wrote: Does anyone know why this works at all? It feels unsafe yet it works.
Pointer points to something that must exist. Does compiler do some magic? string literals are special and exist for the entire duration of the program. | ||
| ||