Learn HTML

  • Cookies help us deliver our services.
  • By using our services, you agree to our use of cookies

Learn HTML tag with code syntax.
Continue reading “Learn HTML”

python

Most pythonic way of checking if a form submiited has data  #angularjs #reactjs

  • I’m currently learning Django however I’m torn on how to structure the equivalent of add method using it.
  • I’m creating a URL shortener and I’m between the following methods to implement in creating the shortened URL:

    Specifically, I want to know the best practice on the following:

    Is it best practice to explicity test if method is post or is enough Is recommended to be used or this is just suppressing the error?

  • If (2) is not recommended, how can I make the required and throw an error?
  • I also tried the following but the except block is not triggered when I submit a blank form def shorten(request): if request.method == ‘POST’: try: http_url = request.POST[“http_url”] short_id = get_short_code() new_url = Urls(http_url=http_url, short_id=short_id) new_url.
  • save() return except KeyError: error_message = “You didn’t provide a valid url” return render(request, ‘url_shortener/shorten.html’, { ‘error_message’ : error_message }) return render(request, ‘url_shortener/shorten.html’)

I’m currently learning Django however I’m torn on how to structure the equivalent of add method using it. I’m creating a URL shortener and I’m between the following methods to implement in creating the shortened URL:
Continue reading “python”

Learn HTML

  • Cookies help us deliver our services.
  • By using our services, you agree to our use of cookies

Learn HTML tag with code syntax.
Continue reading “Learn HTML”

Nandun Thilina Bandara – Software/Web Developer, Software Engineering Undergraduate @ SLIIT

AngularJS blog series starting soon... 😊  #angularjs #javascript #frontend #sliit #nandunb

  • Software/Web Developer, Software Engineering Undergraduate @ SLIIT
  • Bandit Code Challenges HackerRank hax.tor.hu Internet of Things Programming Projects Wargames/CTF
  • January 11, 2017 – 0 Comments
  • header
  • November 25, 2016 – 0 Comments

Software/Web Developer, Software Engineering Undergraduate @ SLIIT
Continue reading “Nandun Thilina Bandara – Software/Web Developer, Software Engineering Undergraduate @ SLIIT”

Opesanya Adebayo’s answer to How can I master JavaScript to the level of being able to build AngularJS?

  • Don’t spend 10 years building a framework that will end up being used by only you because it isn’t maintainable.
  • You’ll need to really understand algorithms, because in trying to solve a problem, you don’t end up building a framework that creates more grievous problems like high complexity and unscalabiity.
  • Building a framework is not something only one person can do conveniently.
  • I really cannot put a time frame to how long it will take to build a framework yourself.
  • You want your framework to be as efficient as possible.

Yes, I’d like to know starting from vanilla JS, how can I take my skills to the next level to be able to understand 80–90% of the source code and ability to recreate frameworks like Angular, React and Express.
Continue reading “Opesanya Adebayo’s answer to How can I master JavaScript to the level of being able to build AngularJS?”